2006-12-01-bool-casts.ll 344 B

123456789101112131415
  1. ; RUN: opt < %s -constprop -S | \
  2. ; RUN: grep "ret i32 -1"
  3. ; RUN: opt < %s -constprop -S | \
  4. ; RUN: grep "ret i32 1"
  5. define i32 @test1() {
  6. %A = sext i1 true to i32 ; <i32> [#uses=1]
  7. ret i32 %A
  8. }
  9. define i32 @test2() {
  10. %A = zext i1 true to i32 ; <i32> [#uses=1]
  11. ret i32 %A
  12. }