[PATCH] D118264: [DAG] SelectionDAG::getNode(N1,N2) - detect N2 constant vector splats as well as scalars
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 11 04:08:20 PST 2022
RKSimon added a comment.
What we might have done is uncovered an existing inconsistency with or with undef folding: https://gcc.godbolt.org/z/e6aPfe3Ye which effects later folds, such as the bitcasting (bitcast <32 x i16> to i512).
define i64 @xx(<2 x i64> %a0) {
%s = sub <2 x i64> %a0, %a0
%r = or <2 x i64> <i64 0, i64 undef>, %s
%x = extractelement <2 x i64> %r, i32 1
ret i64 %x
}
instcombine:
define i64 @xx(<2 x i64> %a0) {
ret i64 undef
}
llc:
xx:
movq $-1, %rax
retq
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118264/new/
https://reviews.llvm.org/D118264
More information about the llvm-commits
mailing list