brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · aaaf4f5 Raw
70 lines · plain
1; RUN: llvm-dis < %s.bc| FileCheck %s2; RUN: verify-uselistorder < %s.bc3 4; bitwiseOperations.3.2.ll.bc was generated by passing this file to llvm-as-3.2.5; The test checks that LLVM does not misread bitwise instructions from6; older bitcode files.7 8define void @shl(i8 %x1){9entry:10; CHECK: %res1 = shl i8 %x1, %x111  %res1 = shl i8 %x1, %x112 13; CHECK: %res2 = shl nuw i8 %x1, %x114  %res2 = shl nuw i8 %x1, %x115 16; CHECK: %res3 = shl nsw i8 %x1, %x117  %res3 = shl nsw i8 %x1, %x118 19; CHECK: %res4 = shl nuw nsw i8 %x1, %x120  %res4 = shl nuw nsw i8 %x1, %x121 22  ret void23}24 25define void @lshr(i8 %x1){26entry:27; CHECK: %res1 = lshr i8 %x1, %x128  %res1 = lshr i8 %x1, %x129 30; CHECK: %res2 = lshr exact i8 %x1, %x131  %res2 = lshr exact i8 %x1, %x132 33  ret void34}35 36define void @ashr(i8 %x1){37entry:38; CHECK: %res1 = ashr i8 %x1, %x139  %res1 = ashr i8 %x1, %x140 41; CHECK-NEXT: %res2 = ashr exact i8 %x1, %x142  %res2 = ashr exact i8 %x1, %x143 44  ret void45}46 47define void @and(i8 %x1){48entry:49; CHECK: %res1 = and i8 %x1, %x150  %res1 = and i8 %x1, %x151 52  ret void53}54 55define void @or(i8 %x1){56entry:57; CHECK: %res1 = or i8 %x1, %x158  %res1 = or i8 %x1, %x159 60  ret void61}62 63define void @xor(i8 %x1){64entry:65; CHECK: %res1 = xor i8 %x1, %x166  %res1 = xor i8 %x1, %x167 68  ret void69}70