[PATCH] D54646: DAG combiner: fold (select, C, X, undef) -> X
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 16 14:02:34 PST 2018
arsenm added a comment.
I think this was to utilize dmask turning into undef:
if (!DMask && !BaseOpcode->Store) {
// Eliminate no-op loads. Stores with dmask == 0 are *not* no-op: they
// store the channels' default values.
SDValue Undef = DAG.getUNDEF(Op.getValueType());
if (isa<MemSDNode>(Op))
return DAG.getMergeValues({Undef, Op.getOperand(0)}, DL);
return Undef;
Any way that makes a non-obvious in the IR undef should work
https://reviews.llvm.org/D54646
More information about the llvm-commits
mailing list