xref: /llvm-project/llvm/test/Bitcode/bitwiseInstructions.3.2.ll (revision c8eccd1147800b8a2720ded56f42c7342812430e)
19201fb9cSMichael Kuperstein; RUN: llvm-dis < %s.bc| FileCheck %s
2*c8eccd11SDuncan P. N. Exon Smith; RUN: verify-uselistorder < %s.bc
39201fb9cSMichael Kuperstein
49201fb9cSMichael Kuperstein; bitwiseOperations.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
59201fb9cSMichael Kuperstein; The test checks that LLVM does not misread bitwise instructions from
69201fb9cSMichael Kuperstein; older bitcode files.
79201fb9cSMichael Kuperstein
89201fb9cSMichael Kupersteindefine void @shl(i8 %x1){
99201fb9cSMichael Kupersteinentry:
109201fb9cSMichael Kuperstein; CHECK: %res1 = shl i8 %x1, %x1
119201fb9cSMichael Kuperstein  %res1 = shl i8 %x1, %x1
129201fb9cSMichael Kuperstein
139201fb9cSMichael Kuperstein; CHECK: %res2 = shl nuw i8 %x1, %x1
149201fb9cSMichael Kuperstein  %res2 = shl nuw i8 %x1, %x1
159201fb9cSMichael Kuperstein
169201fb9cSMichael Kuperstein; CHECK: %res3 = shl nsw i8 %x1, %x1
179201fb9cSMichael Kuperstein  %res3 = shl nsw i8 %x1, %x1
189201fb9cSMichael Kuperstein
199201fb9cSMichael Kuperstein; CHECK: %res4 = shl nuw nsw i8 %x1, %x1
209201fb9cSMichael Kuperstein  %res4 = shl nuw nsw i8 %x1, %x1
219201fb9cSMichael Kuperstein
229201fb9cSMichael Kuperstein  ret void
239201fb9cSMichael Kuperstein}
249201fb9cSMichael Kuperstein
259201fb9cSMichael Kupersteindefine void @lshr(i8 %x1){
269201fb9cSMichael Kupersteinentry:
279201fb9cSMichael Kuperstein; CHECK: %res1 = lshr i8 %x1, %x1
289201fb9cSMichael Kuperstein  %res1 = lshr i8 %x1, %x1
299201fb9cSMichael Kuperstein
309201fb9cSMichael Kuperstein; CHECK: %res2 = lshr exact i8 %x1, %x1
319201fb9cSMichael Kuperstein  %res2 = lshr exact i8 %x1, %x1
329201fb9cSMichael Kuperstein
339201fb9cSMichael Kuperstein  ret void
349201fb9cSMichael Kuperstein}
359201fb9cSMichael Kuperstein
369201fb9cSMichael Kupersteindefine void @ashr(i8 %x1){
379201fb9cSMichael Kupersteinentry:
389201fb9cSMichael Kuperstein; CHECK: %res1 = ashr i8 %x1, %x1
399201fb9cSMichael Kuperstein  %res1 = ashr i8 %x1, %x1
409201fb9cSMichael Kuperstein
419201fb9cSMichael Kuperstein; CHECK-NEXT: %res2 = ashr exact i8 %x1, %x1
429201fb9cSMichael Kuperstein  %res2 = ashr exact i8 %x1, %x1
439201fb9cSMichael Kuperstein
449201fb9cSMichael Kuperstein  ret void
459201fb9cSMichael Kuperstein}
469201fb9cSMichael Kuperstein
479201fb9cSMichael Kupersteindefine void @and(i8 %x1){
489201fb9cSMichael Kupersteinentry:
499201fb9cSMichael Kuperstein; CHECK: %res1 = and i8 %x1, %x1
509201fb9cSMichael Kuperstein  %res1 = and i8 %x1, %x1
519201fb9cSMichael Kuperstein
529201fb9cSMichael Kuperstein  ret void
539201fb9cSMichael Kuperstein}
549201fb9cSMichael Kuperstein
559201fb9cSMichael Kupersteindefine void @or(i8 %x1){
569201fb9cSMichael Kupersteinentry:
579201fb9cSMichael Kuperstein; CHECK: %res1 = or i8 %x1, %x1
589201fb9cSMichael Kuperstein  %res1 = or i8 %x1, %x1
599201fb9cSMichael Kuperstein
609201fb9cSMichael Kuperstein  ret void
619201fb9cSMichael Kuperstein}
629201fb9cSMichael Kuperstein
639201fb9cSMichael Kupersteindefine void @xor(i8 %x1){
649201fb9cSMichael Kupersteinentry:
659201fb9cSMichael Kuperstein; CHECK: %res1 = xor i8 %x1, %x1
669201fb9cSMichael Kuperstein  %res1 = xor i8 %x1, %x1
679201fb9cSMichael Kuperstein
689201fb9cSMichael Kuperstein  ret void
699201fb9cSMichael Kuperstein}
70