[PATCH] D102393: [DAGCombiner] Relax an assertion to an early return
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 13 04:53:47 PDT 2021
frasercrmck added a comment.
In D102393#2756528 <https://reviews.llvm.org/D102393#2756528>, @lebedev.ri wrote:
> We got here because in `foldSelectOfConstants()`
>
> auto *C1 = dyn_cast<ConstantSDNode>(N1);
> auto *C2 = dyn_cast<ConstantSDNode>(N2);
> if (!C1 || !C2)
> return SDValue();
>
> didn't return.
> So what are those constants?
They're constants but they have implicit truncation. After legalization, RV64 -- which doesn't have legal i32 -- sees:
t9: v4i32 = BUILD_VECTOR Constant:i64<878082066>, Constant:i64<878082066>, Constant:i64<878082066>, Constant:i64<878082066>
t11: v4i32 = BUILD_VECTOR Constant:i64<1164411171>, Constant:i64<1164411171>, Constant:i64<1164411171>, Constant:i64<1164411171>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102393/new/
https://reviews.llvm.org/D102393
More information about the llvm-commits
mailing list