mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
- Add "Commutative" property to intrinsics. This allows tblgen to generate the commuted variants for dagisel matching code.
- Mark lots of X86 intrinsics as "Commutative" to allow load folding. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52353 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -404,6 +404,7 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R) {
|
||||
std::string DefName = R->getName();
|
||||
ModRef = WriteMem;
|
||||
isOverloaded = false;
|
||||
isCommutative = false;
|
||||
|
||||
if (DefName.size() <= 4 ||
|
||||
std::string(DefName.begin(), DefName.begin()+4) != "int_")
|
||||
@@ -469,6 +470,8 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R) {
|
||||
ModRef = WriteArgMem;
|
||||
else if (Property->getName() == "IntrWriteMem")
|
||||
ModRef = WriteMem;
|
||||
else if (Property->getName() == "Commutative")
|
||||
isCommutative = true;
|
||||
else
|
||||
assert(0 && "Unknown property!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user