Skip to content
Commit d2e605c9 authored by Craig Topper's avatar Craig Topper
Browse files

[PowerPC] Correct missue of getOperandConstraint in PPCInstrInfo::commuteInstructionImpl

getOperandConstraint does not return a bool, it returns an int. It
returns -1 if there is no TIED_TO.

Additionally, TIED_TO is only set on use operands not defs and it
points to the def that the use is tied to. So calling it on operand 0
is guaranteed to return -1.

As far as I can tell this code must have been copied from the
generic implementation prior to 6aa2744b.o

Unfortunately, this code is not executed in lit tests. I just happened
to notice it while looking for other uses of TIED_TO for something
I was working on.

Reviewed By: nemanjai

Differential Revision: https://reviews.llvm.org/D152754
parent 0a89bda4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment