1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib/Transforms
Sanjay Patel f9173bbcdf [InstCombine] reduce signbit test of logic ops to cmp with zero
This is the pattern from the description of:
https://llvm.org/PR50816

There might be a way to generalize this to a smaller or more
generic pattern, but I have not found it yet.

https://alive2.llvm.org/ce/z/ShzJoF

define i1 @src(i8 %x) {
  %add = add i8 %x, -1
  %xor = xor i8 %x, -1
  %and = and i8 %add, %xor
  %r = icmp slt i8 %and, 0
  ret i1 %r
}

define i1 @tgt(i8 %x) {
  %r = icmp eq i8 %x, 0
  ret i1 %r
}
2021-07-12 09:01:26 -04:00
..
AggressiveInstCombine [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
CFGuard llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
Coroutines [coro async] Cap the alignment of spilled values (vs. allocas) at the max frame alignment 2021-07-07 08:06:25 -07:00
Hello
InstCombine [InstCombine] reduce signbit test of logic ops to cmp with zero 2021-07-12 09:01:26 -04:00
Instrumentation [ASan][AMDGPU] Make shadow offset match X86 on Linux 2021-07-09 07:48:03 +05:30
IPO [llvm][Inliner] Templatize PriorityInlineOrder 2021-07-12 10:38:22 +08:00
ObjCARC [ObjC][ARC] Prevent moving objc_retain calls past objc_release calls 2021-07-05 12:16:15 -07:00
Scalar [RS4GC] Use one DVCache for both inlineGetBaseAndOffset() and insertParsePoints() 2021-07-12 18:13:00 +07:00
Utils [IndVars] Don't widen pointers in WidenIV::getWideRecurrence 2021-07-11 17:04:50 -07:00
Vectorize [LV] Ignore candidate VFs with invalid costs. 2021-07-12 09:58:22 +01:00
CMakeLists.txt [NewPM][HelloWorld] Move HelloWorld to Utils 2021-02-03 12:59:40 -08:00