Should avoid some regressions in D109065
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/X86/insertelement-ones.ll | ||
---|---|---|
314–316 | Are we intentionally not merging constant vectors in hope of promoting their reuse? |
llvm/test/CodeGen/X86/insertelement-ones.ll | ||
---|---|---|
314–316 | Have these been lowered to constant pool loads before reassociation sees it? |
llvm/test/CodeGen/X86/insertelement-ones.ll | ||
---|---|---|
314–316 | As far as i can tell from -debug, yes. |
@craig.topper Can you recall if there was any reason why we don't already support pre-SSE41 v16i8 lowering?
I don't recall anything.
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
19315 | Why references? | |
19317 | Can't you just fill the vector with the Keep value using the SmallVector constructor, and then just replace element i with the OverrideElt after its constructed? No loop required. | |
19320 | Is the AND case not tested? All the test changes have Or. |
Thanks for taking a look!
Addressed review notes.
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
19320 | It appears to get handled already, so i've dropped it here. |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
19319 | Drop the IsZeroElt here? |
LGTM unless we're considered about the failure to merge constant pools? I suppose the easiest fix for that would be to move this to a DAG combine between LegalizeVectorOps and LegalizeDAG?
Thank you! I think this is already better than it was before, not sure we have to fix this all the way on a single go :)
@RKSimon ?
Why references?