[PATCH] D81708: [DAGCombine] Generalize the case (add (or x, c1), c2) -> (add x, (c1 + c2))
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 23:25:46 PDT 2020
lebedev.ri added reviewers: lebedev.ri, craig.topper, RKSimon.
lebedev.ri added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2189
if (N0.getOpcode() == ISD::OR &&
- isa<FrameIndexSDNode>(N0.getOperand(0)) &&
- isa<ConstantSDNode>(N0.getOperand(1)) &&
+ DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1)) &&
DAG.haveNoCommonBitsSet(N0.getOperand(0), N0.getOperand(1))) {
----------------
I strongly suspect you need `, /* NoOpaque */ true` here, else folding can fail.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81708/new/
https://reviews.llvm.org/D81708
More information about the llvm-commits
mailing list