[PATCH] D65802: [DAGCombiner] Fold br(xor(xor(x, y), 1)) as br(x == y)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 05:59:30 PDT 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13526-13527
if (Op0.getOpcode() != ISD::SETCC && Op1.getOpcode() != ISD::SETCC) {
bool Equal = false;
- if (isOneConstant(Op0) && Op0.hasOneUse() &&
+ if (isOneConstant(Op1) && Op0.hasOneUse() &&
Op0.getOpcode() == ISD::XOR) {
----------------
```
// xor (xor %a, %b), -1
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65802/new/
https://reviews.llvm.org/D65802
More information about the llvm-commits
mailing list