[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
Loading
Please sign in to comment