[PATCH] D16809: [JumpThreading] See through Cast Instructions

Haicheng Wu via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 11:35:47 PST 2016


haicheng added inline comments.

================
Comment at: test/Transforms/JumpThreading/basic.ll:493
@@ +492,3 @@
+
+Merge:
+	%B = phi i32 [1, %Entry], [%v1, %F1]
----------------
gberry wrote:
> It seems like this change to JumpThreading would not be needed if the Merge block code had been simplified to the following:
> 
> ```
> Merge:
>   %B = phi i32 [1, %Entry], [%v1, %F1]
>   %M = icmp eq i32 %B, 0 
>   br i1 %M, label %T2, label %F2
> ```
> 
> Are we missing this simplification, or is there something more complex going on in the code this was extracted from that prevents it from happening?
The simplification is missing.  InstCombine can optimize it, but it is called after jumpthreading.


Repository:
  rL LLVM

http://reviews.llvm.org/D16809





More information about the llvm-commits mailing list