llvm-project/llvm/lib/Transforms/InstCombine
Dávid Bolvanský 3a696f6092 [InstCombine] rotate(X,Z) eq/ne rotate(Y,Z) ---> X eq/ne Y (PR51565)
```

----------------------------------------
define i1 @src(i8 %x, i8 %y, i8 %z) {
%0:
  %f = fshl i8 %x, i8 %x, i8 %z
  %f2 = fshl i8 %y, i8 %y, i8 %z
  %r = icmp eq i8 %f, %f2
  ret i1 %r
}
=>
define i1 @tgt(i8 %x, i8 %y, i8 %z) {
%0:
  %r = icmp eq i8 %x, %y
  ret i1 %r
}
Transformation seems to be correct!

```

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

Solves PR51565

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D109271
2021-09-04 18:58:44 +02:00
..
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
InstCombineAddSub.cpp [InstCombine] generalize subtract with 'not' operands; 2nd try 2021-08-23 17:06:51 -04:00
InstCombineAndOrXor.cpp [InstCombine] Perform "eq of parts" fold with logical ops 2021-08-22 16:55:53 +02:00
InstCombineAtomicRMW.cpp Add missing namespace closure comments. NFCI. 2020-09-23 16:19:25 +01:00
InstCombineCalls.cpp Revert @llvm.isnan intrinsic patchset. 2021-09-02 13:53:56 +03:00
InstCombineCasts.cpp [SVE] Add folds for truncation of vscale 2021-08-13 10:18:00 +01:00
InstCombineCompares.cpp [InstCombine] rotate(X,Z) eq/ne rotate(Y,Z) ---> X eq/ne Y (PR51565) 2021-09-04 18:58:44 +02:00
InstCombineInternal.h [InstCombine] Perform "eq of parts" fold with logical ops 2021-08-22 16:55:53 +02:00
InstCombineLoadStoreAlloca.cpp Fixing an infinite loop problem in InstCombine 2021-07-29 12:57:17 -07:00
InstCombineMulDivRem.cpp [InstCombine] Fold (sext bool X) * (sext bool X) to zext (and X, X) 2021-06-18 16:28:06 +07:00
InstCombineNegator.cpp [Transforms] Use range-based for loops (NFC) 2021-02-08 22:33:53 -08:00
InstCombinePHI.cpp [InstCombine] Fold phi ( inttoptr/ptrtoint x ) to phi (x) 2021-08-03 17:52:59 +05:30
InstCombineSelect.cpp [InstCombine] fix propagation of FMF through select-of-fnegs 2021-08-31 09:52:17 -04:00
InstCombineShifts.cpp [InstCombine] fix typos in comments; NFC 2021-08-31 12:08:36 -04:00
InstCombineSimplifyDemanded.cpp [InstCombine] fold umax/umin intrinsics based on demanded bits 2021-08-12 12:37:45 -04:00
InstCombineVectorOps.cpp [InstCombine] fix typo; NFC 2021-08-31 09:02:14 -04:00
InstructionCombining.cpp Revert rG1c9bec727ab5c53fa060560dc8d346a911142170 : [InstCombine] Fold (gep (oneuse(gep Ptr, Idx0)), Idx1) -> (gep Ptr, (add Idx0, Idx1)) (PR51069) 2021-08-23 21:09:26 +01:00