[llvm] [DAG] Fold freeze(shuffle(x,y,m)) -> shuffle(freeze(x),freeze(y),m) (PR #90952)
Björn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Fri May 3 12:41:03 PDT 2024
================
@@ -15533,8 +15534,16 @@ SDValue DAGCombiner::visitFREEZE(SDNode *N) {
if (Op.getOpcode() == ISD::UNDEF)
Op = DAG.getFreeze(Op);
}
- // NOTE: this strips poison generating flags.
- SDValue R = DAG.getNode(N0.getOpcode(), SDLoc(N0), N0->getVTList(), Ops);
+
+ SDValue R;
+ if (auto *SVN = dyn_cast<ShuffleVectorSDNode>(N0)) {
----------------
bjope wrote:
Ok. Got it.
https://github.com/llvm/llvm-project/pull/90952
More information about the llvm-commits
mailing list