[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp AlphaISelPattern.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Wed May 4 12:12:23 PDT 2005
Changes in directory llvm/lib/Target/Alpha:
AlphaAsmPrinter.cpp updated: 1.13 -> 1.14
AlphaISelPattern.cpp updated: 1.107 -> 1.108
---
Log message:
Well, add support for ct* for 21264 only.
21164 is broken until expand works.
---
Diffs of the changes: (+11 -5)
AlphaAsmPrinter.cpp | 3 ++-
AlphaISelPattern.cpp | 13 +++++++++----
2 files changed, 11 insertions(+), 5 deletions(-)
Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.13 llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.14
--- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.13 Thu Apr 21 18:10:23 2005
+++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp Wed May 4 14:12:09 2005
@@ -31,6 +31,7 @@
namespace llvm {
extern cl::opt<bool> EnableAlphaFTOI;
+ extern cl::opt<bool> EnableAlphaCT;
}
namespace {
@@ -234,7 +235,7 @@
bool AlphaAsmPrinter::doInitialization(Module &M)
{
AsmPrinter::doInitialization(M);
- if(EnableAlphaFTOI)
+ if(EnableAlphaFTOI || EnableAlphaCT)
O << "\t.arch ev6\n";
else
O << "\t.arch ev56\n";
Index: llvm/lib/Target/Alpha/AlphaISelPattern.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.107 llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.108
--- llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.107 Tue May 3 12:19:29 2005
+++ llvm/lib/Target/Alpha/AlphaISelPattern.cpp Wed May 4 14:12:09 2005
@@ -36,9 +36,12 @@
cl::opt<bool> EnableAlphaIDIV("enable-alpha-intfpdiv",
cl::desc("Use the FP div instruction for integer div when possible"),
cl::Hidden);
- cl::opt<bool> EnableAlphaFTOI("enable-alpha-ftoi",
+ cl::opt<bool> EnableAlphaFTOI("enable-alpha-FTOI",
cl::desc("Enable use of ftoi* and itof* instructions (ev6 and higher)"),
cl::Hidden);
+ cl::opt<bool> EnableAlphaCT("enable-alpha-CT",
+ cl::desc("Enable use of the ctpop, ctlz, and cttz instructions"),
+ cl::Hidden);
cl::opt<bool> EnableAlphaCount("enable-alpha-count",
cl::desc("Print estimates on live ins and outs"),
cl::Hidden);
@@ -76,9 +79,11 @@
setOperationAction(ISD::SREM , MVT::f32 , Expand);
setOperationAction(ISD::SREM , MVT::f64 , Expand);
- // setOperationAction(ISD::CTPOP , MVT::i64 , Expand);
- // setOperationAction(ISD::CTTZ , MVT::i64 , Expand);
- // setOperationAction(ISD::CTTZ , MVT::i64 , Expand);
+ if (!EnableAlphaCT) {
+ setOperationAction(ISD::CTPOP , MVT::i64 , Expand);
+ setOperationAction(ISD::CTTZ , MVT::i64 , Expand);
+ setOperationAction(ISD::CTTZ , MVT::i64 , Expand);
+ }
//If this didn't legalize into a div....
// setOperationAction(ISD::SREM , MVT::i64, Expand);
More information about the llvm-commits
mailing list