[all-commits] [llvm/llvm-project] d2e605: [PowerPC] Correct missue of getOperandConstraint i...
Craig Topper via All-commits
all-commits at lists.llvm.org
Wed Aug 9 22:06:19 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d2e605c92a53d61df940970371712f09761dbbdd
https://github.com/llvm/llvm-project/commit/d2e605c92a53d61df940970371712f09761dbbdd
Author: Craig Topper <craig.topper at sifive.com>
Date: 2023-08-09 (Wed, 09 Aug 2023)
Changed paths:
M llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
Log Message:
-----------
[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 6aa2744bed0b8.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
More information about the All-commits
mailing list