zext-wrap.ll 651 B

1234567891011121314151617181920212223
  1. ; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
  2. ; PR4569
  3. define i16 @main() nounwind {
  4. entry:
  5. br label %bb.i
  6. bb.i: ; preds = %bb1.i, %bb.nph
  7. %l_95.0.i1 = phi i8 [ %tmp1, %bb.i ], [ 0, %entry ]
  8. ; This cast shouldn't be folded into the addrec.
  9. ; CHECK: %tmp = zext i8 %l_95.0.i1 to i16
  10. ; CHECK: --> (zext i8 {0,+,-1}<%bb.i> to i16){{ U: [^ ]+ S: [^ ]+}}{{ *}}Exits: 2
  11. %tmp = zext i8 %l_95.0.i1 to i16
  12. %tmp1 = add i8 %l_95.0.i1, -1
  13. %phitmp = icmp eq i8 %tmp1, 1
  14. br i1 %phitmp, label %bb1.i.func_36.exit_crit_edge, label %bb.i
  15. bb1.i.func_36.exit_crit_edge:
  16. ret i16 %tmp
  17. }