R600/SI: Fix using wrong operand indices when commuting
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 26 Sep 2014 17:54:43 +0000 (17:54 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 26 Sep 2014 17:54:43 +0000 (17:54 +0000)
commit26b2a7834e7162fd28b81c21c7c19a94baa24610
tree3a3dd523b3ce45f3c60326e1751f58d5d4679248
parentea849e9adcbcba4b421e782d58a558397e2da611
R600/SI: Fix using wrong operand indices when commuting

No test since the current SIISelLowering::legalizeOperands
effectively hides this, and the general uses seem to only fire
on SALU instructions which don't have modifiers between
the operands.

When trying to use legalizeOperands immediately after
instruction selection, it now sees a lot more patterns
it did not see before which break on this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218527 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/R600/SIInstrInfo.cpp
test/CodeGen/R600/llvm.AMDGPU.clamp.ll