summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-05-04 19:12:09 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-05-04 19:12:09 +0000
commitaed06a0e92f544ce172e8902c596a7690d02bce0 (patch)
tree890085838316c0e50d59734873e1b3aacf676ec8 /llvm/lib/Target
parentdd426dd04d8b251c4b118f4c521a921bfcf6bbb0 (diff)
downloadbcm5719-llvm-aed06a0e92f544ce172e8902c596a7690d02bce0.tar.gz
bcm5719-llvm-aed06a0e92f544ce172e8902c596a7690d02bce0.zip
Well, add support for ct* for 21264 only.
21164 is broken until expand works. llvm-svn: 21692
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp3
-rw-r--r--llvm/lib/Target/Alpha/AlphaISelPattern.cpp13
2 files changed, 11 insertions, 5 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp b/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
index abfc16cd38b..4bf7b56e7c9 100644
--- a/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
+++ b/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
@@ -31,6 +31,7 @@ using namespace llvm;
namespace llvm {
extern cl::opt<bool> EnableAlphaFTOI;
+ extern cl::opt<bool> EnableAlphaCT;
}
namespace {
@@ -234,7 +235,7 @@ void AlphaAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
bool AlphaAsmPrinter::doInitialization(Module &M)
{
AsmPrinter::doInitialization(M);
- if(EnableAlphaFTOI)
+ if(EnableAlphaFTOI || EnableAlphaCT)
O << "\t.arch ev6\n";
else
O << "\t.arch ev56\n";
diff --git a/llvm/lib/Target/Alpha/AlphaISelPattern.cpp b/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
index 53d8a9e561c..aa4ed3b13c3 100644
--- a/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
+++ b/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
@@ -36,9 +36,12 @@ namespace llvm {
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 @@ namespace {
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);
OpenPOWER on IntegriCloud