This helps SelectionDAGBuilder recognize the splat can be used as a uniform base.
Details
Diff Detail
Event Timeline
llvm/lib/Analysis/VectorUtils.cpp | ||
---|---|---|
345 | Inconsistent use of "llvm::" ? Not sure if there's some guideline/pref, but seems odd to see one Value use the namespace but the other does not. | |
llvm/lib/CodeGen/CodeGenPrepare.cpp | ||
5403 | I know we're doing this cast in the other clause too, but is there anything guarding this function from crashing with scalable vectors? | |
llvm/test/CodeGen/X86/masked_gather_scatter.ll | ||
3323 | pre-commit baseline tests? |
-Pre-commit tests
-Remove hopefully unnecessary llvm::
-Add early bailout and FIXME for scalable vetors.
If the address is a splat, generating a gather/scatter seems a little weird. I guess if the mask is non-trivial, there isn't any obvious way to rewrite it in target-independent IR. though.
No testcases for gather?
No, but I don't think it really matters for this transform. If the mask is constant and the pointer is a splat, we should probably replace the gather/scatter with scalar load/store and shuffle/extractelement in instcombine.
Inconsistent use of "llvm::" ? Not sure if there's some guideline/pref, but seems odd to see one Value use the namespace but the other does not.