2012-05-22-PreCrash.ll 1022 B

123456789101112131415161718192021222324252627282930313233
  1. ; RUN: opt < %s -gvn
  2. ; PR12858
  3. define void @fn5(i16 signext %p1, i8 signext %p2) nounwind uwtable {
  4. entry:
  5. br i1 undef, label %if.else, label %if.then
  6. if.then: ; preds = %entry
  7. br label %if.end
  8. if.else: ; preds = %entry
  9. %conv = sext i16 %p1 to i32
  10. br label %if.end
  11. if.end: ; preds = %if.else, %if.then
  12. %conv1 = sext i16 %p1 to i32
  13. br i1 undef, label %if.then3, label %if.else4
  14. if.then3: ; preds = %if.end
  15. br label %if.end12
  16. if.else4: ; preds = %if.end
  17. %conv7 = sext i8 %p2 to i32
  18. %cmp8 = icmp eq i32 %conv1, %conv7
  19. br i1 %cmp8, label %if.then10, label %if.end12
  20. if.then10: ; preds = %if.else4
  21. br label %if.end12
  22. if.end12: ; preds = %if.then10, %if.else4, %if.then3
  23. %conv13 = sext i8 %p2 to i32
  24. ret void
  25. }