llvm-project/llvm/lib/Transforms
Dávid Bolvanský 0529946b5b [instCombine] Add (A ^ B) | ~(A | B) -> ~(A & B)
define i32 @src(i32 %x, i32 %y) {
%0:
  %xor = xor i32 %y, %x
  %or = or i32 %y, %x
  %neg = xor i32 %or, 4294967295
  %or1 = or i32 %xor, %neg
  ret i32 %or1
}
=>
define i32 @tgt(i32 %x, i32 %y) {
%0:
  %and = and i32 %x, %y
  %neg = xor i32 %and, 4294967295
  ret i32 %neg
}
Transformation seems to be correct!

https://alive2.llvm.org/ce/z/Cvca4a
2021-01-12 19:29:17 +01:00
..
AggressiveInstCombine [AggressiveInstCombine] Generalize foldGuardedRotateToFunnelShift to generic funnel shifts (REAPPLIED) 2020-12-21 15:22:27 +00:00
CFGuard llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
Coroutines [CoroSplit][NewPM] Don't call LazyCallGraph functions to split when no clones 2021-01-07 14:06:35 -08:00
Hello
HelloNew llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
IPO [OpenMPOpt][WIP] Expand parallel region merging 2021-01-11 08:06:23 -08:00
InstCombine [instCombine] Add (A ^ B) | ~(A | B) -> ~(A & B) 2021-01-12 19:29:17 +01:00
Instrumentation [llvm] Use *Set::contains (NFC) 2021-01-07 20:29:34 -08:00
ObjCARC [NewPM] Run ObjC ARC passes 2021-01-08 15:47:11 -08:00
Scalar [NFC][LICM] Minor improvements to debug output 2021-01-11 18:02:49 -08:00
Utils [NFCI][Utils/Local] removeUnreachableBlocks(): cleanup support for lazy DomTreeUpdater 2021-01-12 02:09:47 +03:00
Vectorize [VPlan] Unify value/recipe printing after VPDef transition. 2021-01-11 14:42:46 +00:00
CMakeLists.txt Reland [docs][NewPM] Add docs for writing NPM passes 2020-09-14 16:06:19 -07:00