crash.ll 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ; RUN: opt < %s -correlated-propagation
  2. ; PR8161
  3. define void @test1() nounwind ssp {
  4. entry:
  5. br label %for.end
  6. for.cond.us.us: ; preds = %for.cond.us.us
  7. %cmp6.i.us.us = icmp sgt i32 1, 0
  8. %lor.ext.i.us.us = zext i1 %cmp6.i.us.us to i32
  9. %lor.ext.add.i.us.us = select i1 %cmp6.i.us.us, i32 %lor.ext.i.us.us, i32 undef
  10. %conv.i.us.us = trunc i32 %lor.ext.add.i.us.us to i16
  11. %sext.us.us = shl i16 %conv.i.us.us, 8
  12. %conv6.us.us = ashr i16 %sext.us.us, 8
  13. %and.us.us = and i16 %conv6.us.us, %and.us.us
  14. br i1 false, label %for.end, label %for.cond.us.us
  15. for.end: ; preds = %for.cond.us, %for.cond.us.us, %entry
  16. ret void
  17. }
  18. ; PR 8790
  19. define void @test2() nounwind ssp {
  20. entry:
  21. br label %func_29.exit
  22. sdf.exit.i:
  23. %l_44.1.mux.i = select i1 %tobool5.not.i, i8 %l_44.1.mux.i, i8 1
  24. br label %srf.exit.i
  25. srf.exit.i:
  26. %tobool5.not.i = icmp ne i8 undef, 0
  27. br i1 %tobool5.not.i, label %sdf.exit.i, label %func_29.exit
  28. func_29.exit:
  29. ret void
  30. }
  31. ; PR13972
  32. define void @test3() nounwind {
  33. for.body:
  34. br label %return
  35. for.cond.i: ; preds = %if.else.i, %for.body.i
  36. %e.2.i = phi i32 [ %e.2.i, %if.else.i ], [ -8, %for.body.i ]
  37. br i1 undef, label %return, label %for.body.i
  38. for.body.i: ; preds = %for.cond.i
  39. switch i32 %e.2.i, label %for.cond3.i [
  40. i32 -3, label %if.else.i
  41. i32 0, label %for.cond.i
  42. ]
  43. for.cond3.i: ; preds = %for.cond3.i, %for.body.i
  44. br label %for.cond3.i
  45. if.else.i: ; preds = %for.body.i
  46. br label %for.cond.i
  47. return: ; preds = %for.cond.i, %for.body
  48. ret void
  49. }