[PATCH] D22779: Clone block with icmp+branch if it likely results in further jump threading

Haicheng Wu via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 12:05:21 PDT 2016


haicheng added a comment.

A few more inline comments.


================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:900
@@ +899,3 @@
+        continue;
+      Value *Cond = SuccBranch->getCondition();
+      if (!isa<Instruction>(Cond) ||
----------------
What about renaming Cond as SuccCond?

================
Comment at: test/Transforms/JumpThreading/basic.ll:116
@@ -114,2 +115,3 @@
 
 T1:
+; CHECK:   %v1 = call i32 @f1()
----------------
Do you need to change this test case?  It seems %v1 is still the first IR of block T1 after your patch.

================
Comment at: test/Transforms/JumpThreading/basic.ll:197
@@ +196,3 @@
+; CHECK-NEXT: icmp eq i32 %B
+	call i32 @f1()
+	br label %BB11
----------------
What about changing f1 to a different name to distinguish from the call in BB2?


https://reviews.llvm.org/D22779





More information about the llvm-commits mailing list