- 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:
Evan Cheng
2008-06-16 20:29:38 +00:00
parent 35b9a7790e
commit 6bd9567a6a
7 changed files with 189 additions and 92 deletions
+3
View File
@@ -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!");
}