diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUCombinerHelper.cpp')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUCombinerHelper.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCombinerHelper.cpp b/llvm/lib/Target/AMDGPU/AMDGPUCombinerHelper.cpp index e79ff9b597c9..c16d8ee51a7a 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUCombinerHelper.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUCombinerHelper.cpp @@ -373,7 +373,8 @@ void AMDGPUCombinerHelper::applyFoldableFneg(MachineInstr &MI, replaceRegWith(MRI, Dst, NegatedMatchInfo); // Recreate non negated value for other uses of old MatchInfoDst - Builder.setInstrAndDebugLoc(MI); + auto NextInst = ++MatchInfo->getIterator(); + Builder.setInstrAndDebugLoc(*NextInst); Builder.buildFNeg(MatchInfoDst, NegatedMatchInfo, MI.getFlags()); } |
