summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDuraid Madina <duraid@octopus.com.au>2005-08-21 15:43:53 +0000
committerDuraid Madina <duraid@octopus.com.au>2005-08-21 15:43:53 +0000
commit3588ea9bf5d8ee738d4830f0db9d3a5282363f69 (patch)
tree006d6d6c1e4a22d4f93a54e140e02ddf09a4ebbd /llvm
parent4b08ba26d8f754fc55fe104b0dad30ce61bf6774 (diff)
downloadbcm5719-llvm-3588ea9bf5d8ee738d4830f0db9d3a5282363f69.tar.gz
bcm5719-llvm-3588ea9bf5d8ee738d4830f0db9d3a5282363f69.zip
reenable collapse of loadimm+AND -> dep.z (thanks guys)
llvm-svn: 22944
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/IA64/IA64ISelPattern.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Target/IA64/IA64ISelPattern.cpp b/llvm/lib/Target/IA64/IA64ISelPattern.cpp
index b66a0327514..bf5aa565f24 100644
--- a/llvm/lib/Target/IA64/IA64ISelPattern.cpp
+++ b/llvm/lib/Target/IA64/IA64ISelPattern.cpp
@@ -1439,7 +1439,7 @@ assert(0 && "hmm, ISD::SIGN_EXTEND: shouldn't ever be reached. bad luck!\n");
case MVT::i32:
case MVT::i64: {
Tmp1 = SelectExpr(N.getOperand(0));
-/* FIXME switch (ponderIntegerAndWith(N.getOperand(1), Tmp3)) {
+ switch (ponderIntegerAndWith(N.getOperand(1), Tmp3)) {
case 1: // ANDing a constant that is 2^n-1 for some n
switch (Tmp3) {
case 8: // if AND 0x00000000000000FF, be quaint and use zxt1
@@ -1452,12 +1452,13 @@ assert(0 && "hmm, ISD::SIGN_EXTEND: shouldn't ever be reached. bad luck!\n");
BuildMI(BB, IA64::ZXT4, 1, Result).addReg(Tmp1);
break;
default: // otherwise, use dep.z to paste zeros
- BuildMI(BB, IA64::DEPZ, 3, Result).addReg(Tmp1)
+ // FIXME: assert the dep.z is in bounds
+ BuildMI(BB, IA64::DEPZ, 3, Result).addReg(Tmp1)
.addImm(0).addImm(Tmp3);
break;
- }
- return Result; // early exit
- FIXME } */ // fallthrough and emit a simple AND:
+ }
+ return Result; // early exit
+ } // fallthrough and emit a simple AND:
Tmp2 = SelectExpr(N.getOperand(1));
BuildMI(BB, IA64::AND, 2, Result).addReg(Tmp1).addReg(Tmp2);
}
OpenPOWER on IntegriCloud