[PATCH] D86246: AMDGPU/GlobalISel: Use unmerge instead of extract in addrspace queries
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 13:50:45 PDT 2020
arsenm created this revision.
arsenm added reviewers: kerbowa, foad, Petar.Avramovic, mbrkusanin.
Herald added subscribers: hiraditya, t-tye, tpr, dstuttard, rovka, yaxunl, nhaehnle, jvesely, kzhuravl.
Herald added a project: LLVM.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
This is a bit more consistent the regular operation legalization.
https://reviews.llvm.org/D86246
Files:
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
@@ -3330,7 +3330,9 @@
MachineIRBuilder &B,
unsigned AddrSpace) const {
Register ApertureReg = getSegmentAperture(AddrSpace, MRI, B);
- auto Hi32 = B.buildExtract(LLT::scalar(32), MI.getOperand(2).getReg(), 32);
+ auto Unmerge = B.buildUnmerge(LLT::scalar(32), MI.getOperand(2).getReg());
+ Register Hi32 = Unmerge.getReg(1);
+
B.buildICmp(ICmpInst::ICMP_EQ, MI.getOperand(0), Hi32, ApertureReg);
MI.eraseFromParent();
return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86246.286656.patch
Type: text/x-patch
Size: 764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200819/63d434e1/attachment.bin>
More information about the llvm-commits
mailing list