SplitVecOp_EXTRACT_VECTOR_ELT uses dummy pointer info to generate SDLoad, which
causes isel failure on amdgcn target with amdgiz environment since amdgcn backend
needs correct address space to lower SDLoad.
This patch fixes that.
Paths
| Differential D39758
CodeGen: Fix pointer info in SplitVecOp_EXTRACT_VECTOR_ELT ClosedPublic Authored by yaxunl on Nov 7 2017, 1:51 PM.
Details Summary SplitVecOp_EXTRACT_VECTOR_ELT uses dummy pointer info to generate SDLoad, which This patch fixes that.
Diff Detail Event TimelineThis revision is now accepted and ready to land.Nov 7 2017, 2:01 PM efriedma added inline comments.
This revision now requires changes to proceed.Nov 7 2017, 2:30 PM
This revision is now accepted and ready to land.Dec 1 2017, 1:46 PM Closed by commit rL319622: CodeGen: Fix pointer info in… (authored by yaxunl). · Explain WhyDec 2 2017, 2:13 PM This revision was automatically updated to reflect the committed changes. Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 27 2022, 2:19 AM
Revision Contents
Diff 125212 include/llvm/CodeGen/MachineMemOperand.h
lib/CodeGen/MachineOperand.cpp
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/AMDGPU/extload-align.ll
test/CodeGen/AMDGPU/extract_vector_elt-f16.ll
test/CodeGen/AMDGPU/extract_vector_elt-f64.ll
test/CodeGen/AMDGPU/extract_vector_elt-i16.ll
test/CodeGen/AMDGPU/extract_vector_elt-i64.ll
test/CodeGen/AMDGPU/extract_vector_elt-i8.ll
test/CodeGen/AMDGPU/insert_vector_elt.ll
test/CodeGen/AMDGPU/scratch-simple.ll
test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot-compute.ll
test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot.ll
|
You can't use "UndefValue" here; a non-null "Value*" has to be something alias analysis will understand properly.
If you want to actually get this right, you need to use MachinePointerInfo::getFixedStack(). (CreateStackTemporary doesn't explicitly return the FrameIndex, but you can extract it from the returned FrameIndexSDNode.) Or I guess we could add some way to represent an unknown pointer in a specific address-space, but that's probably not any simpler.