[PATCH] D19550: [InstCombine] Determine the result of a select based on a dominating condition.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 11:45:07 PDT 2016
mcrosier created this revision.
mcrosier added reviewers: Gerolf, majnemer, sanjoy.
mcrosier added subscribers: llvm-commits, gberry, bmakam, Gerolf.
This patch attempts to determine the result of a select based on a dominating condition. This is similar to what is done in JumpThreading and SimplifyCFG, except those passes on consider conditional branches and not selects.
AFAICT, the transformation in pr21210.ll is safe, but the comments in the lit test seem to indicate otherwise.
@Gerolf - Would you mind helping me better understand what pr21210.ll is trying to test?
I didn't run into any correctness issues with the llvm-test suite or SPEC200X.
Please take a look,
Chad
http://reviews.llvm.org/D19550
Files:
lib/Analysis/ValueTracking.cpp
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/pr21210.ll
test/Transforms/InstCombine/select-implied.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19550.55054.patch
Type: text/x-patch
Size: 3510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160426/906e8998/attachment.bin>
More information about the llvm-commits
mailing list