summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-06-17 17:01:27 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-06-17 17:01:27 +0000
commitfee1949b3584d5d164c79f3c78a5f7f1f84dc751 (patch)
tree098b673c371914c1b9935cff3b1f764a11ba1d9a /llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
parent5d00c3060e11b1b8725c0af110f011c4d110d39a (diff)
downloadbcm5719-llvm-fee1949b3584d5d164c79f3c78a5f7f1f84dc751.tar.gz
bcm5719-llvm-fee1949b3584d5d164c79f3c78a5f7f1f84dc751.zip
AMDGPU/GlobalISel: Account for multiple defs when finding intrinsic ID
llvm-svn: 363578
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
index e355af18610..6484b7d6421 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
@@ -270,8 +270,7 @@ bool AMDGPUInstructionSelector::selectG_INSERT(MachineInstr &I) const {
bool AMDGPUInstructionSelector::selectG_INTRINSIC(MachineInstr &I,
CodeGenCoverage &CoverageInfo) const {
- unsigned IntrinsicID = I.getOperand(1).getIntrinsicID();
-
+ unsigned IntrinsicID = I.getOperand(I.getNumExplicitDefs()).getIntrinsicID();
switch (IntrinsicID) {
default:
break;
OpenPOWER on IntegriCloud