Home | History | Annotate | Download | only in Bitcode
      1 ; RUN:  llvm-dis < %s.bc| FileCheck %s
      2 
      3 ; bitwiseOperations.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
      4 ; The test checks that LLVM does not misread bitwise instructions from
      5 ; older bitcode files.
      6 
      7 define void @shl(i8 %x1){
      8 entry:
      9 ; CHECK: %res1 = shl i8 %x1, %x1
     10   %res1 = shl i8 %x1, %x1
     11   
     12 ; CHECK: %res2 = shl nuw i8 %x1, %x1
     13   %res2 = shl nuw i8 %x1, %x1
     14   
     15 ; CHECK: %res3 = shl nsw i8 %x1, %x1
     16   %res3 = shl nsw i8 %x1, %x1
     17 
     18 ; CHECK: %res4 = shl nuw nsw i8 %x1, %x1
     19   %res4 = shl nuw nsw i8 %x1, %x1
     20   
     21   ret void
     22 }
     23 
     24 define void @lshr(i8 %x1){
     25 entry:
     26 ; CHECK: %res1 = lshr i8 %x1, %x1
     27   %res1 = lshr i8 %x1, %x1
     28   
     29 ; CHECK: %res2 = lshr exact i8 %x1, %x1
     30   %res2 = lshr exact i8 %x1, %x1
     31   
     32   ret void
     33 }
     34 
     35 define void @ashr(i8 %x1){
     36 entry:
     37 ; CHECK: %res1 = ashr i8 %x1, %x1
     38   %res1 = ashr i8 %x1, %x1
     39 
     40 ; CHECK-NEXT: %res2 = ashr exact i8 %x1, %x1
     41   %res2 = ashr exact i8 %x1, %x1
     42 
     43   ret void
     44 }
     45 
     46 define void @and(i8 %x1){
     47 entry:
     48 ; CHECK: %res1 = and i8 %x1, %x1
     49   %res1 = and i8 %x1, %x1
     50   
     51   ret void
     52 }
     53 
     54 define void @or(i8 %x1){
     55 entry:
     56 ; CHECK: %res1 = or i8 %x1, %x1
     57   %res1 = or i8 %x1, %x1
     58   
     59   ret void
     60 }
     61 
     62 define void @xor(i8 %x1){
     63 entry:
     64 ; CHECK: %res1 = xor i8 %x1, %x1
     65   %res1 = xor i8 %x1, %x1
     66   
     67   ret void
     68 }