llvm-project/llvm/lib/Transforms
Craig Topper dffbbcb3fd [InstCombine] Teach foldSelectICmpAndOr to recognize (select (icmp slt (trunc (X)), 0), Y, (or Y, C2))
Summary:
InstCombine likes to turn (icmp eq (and X, C1), 0) into (icmp slt (trunc (X)), 0) sometimes. This breaks foldSelectICmpAndOr's ability to recognize (select (icmp eq (and X, C1), 0), Y, (or Y, C2))->(or (shl (and X, C1), C3), y).

This patch tries to recover this. I had to flip around some of the early out checks so that I could create a new And instruction during the compare processing without it possibly never getting used.

Reviewers: spatel, majnemer, davide

Reviewed By: spatel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D34184

llvm-svn: 306029
2017-06-22 16:23:30 +00:00
..
Coroutines Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
IPO Do not inline recursive direct calls in sample loader pass. 2017-06-21 17:57:43 +00:00
InstCombine [InstCombine] Teach foldSelectICmpAndOr to recognize (select (icmp slt (trunc (X)), 0), Y, (or Y, C2)) 2017-06-22 16:23:30 +00:00
Instrumentation [ProfileData] PR33517: Check for failure of symtab creation 2017-06-20 01:38:56 +00:00
ObjCARC Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
Scalar Mark dump() methods as const. NFC 2017-06-21 22:19:17 +00:00
Utils Add argmononly attribute to strlen and wcslen, i.e. they only read memory (string) passed to them. 2017-06-18 03:10:26 +00:00
Vectorize Revert "Enable vectorizer-maximize-bandwidth by default." 2017-06-22 10:00:28 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00