]> granicus.if.org Git - llvm/commitdiff
[AMDGPU] Fixed incorrect test in vcnd/vcmp optimization
authorTim Renouf <tpr.llvm@botech.co.uk>
Mon, 15 Apr 2019 10:36:24 +0000 (10:36 +0000)
committerTim Renouf <tpr.llvm@botech.co.uk>
Mon, 15 Apr 2019 10:36:24 +0000 (10:36 +0000)
This fixes a test I introduced in change D59191 (that added src0 and
src1 modifiers to the v_cndmask instruction for disassembly purposes).

Spotted by David Binderman in bug 41488.

Differential Revision: https://reviews.llvm.org/D60652

Change-Id: I6ac95e66cd84e812ed3359ad57bcd0e13198ba0c

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358392 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp

index 9db1e5af015bac22036725ff50b5fd7d8ac467be..7e843e83780b9de4b855f7e65cb9f7ce4a0aa524 100644 (file)
@@ -223,7 +223,7 @@ static unsigned optimizeVcndVcmpPair(MachineBasicBlock &MBB,
     return AMDGPU::NoRegister;
 
   if (TII->hasModifiersSet(*Sel, AMDGPU::OpName::src0_modifiers) ||
-      TII->hasModifiersSet(*Sel, AMDGPU::OpName::src0_modifiers))
+      TII->hasModifiersSet(*Sel, AMDGPU::OpName::src1_modifiers))
     return AMDGPU::NoRegister;
 
   Op1 = TII->getNamedOperand(*Sel, AMDGPU::OpName::src0);