summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuraid Madina <duraid@octopus.com.au>2005-04-26 09:42:50 +0000
committerDuraid Madina <duraid@octopus.com.au>2005-04-26 09:42:50 +0000
commite06ef80244067587e0ec29f9b7248f61d6a5fa31 (patch)
treeb9b81ec030a34e41d8fb49f74eb844ba94b1d6db /llvm/lib
parentbbd0cd71a8707d75bde4e5a81f9a712e9cfee973 (diff)
downloadbcm5719-llvm-e06ef80244067587e0ec29f9b7248f61d6a5fa31.tar.gz
bcm5719-llvm-e06ef80244067587e0ec29f9b7248f61d6a5fa31.zip
constmul bugfix: multiply by 27611 was broken
llvm-svn: 21564
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/IA64/IA64ISelPattern.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/llvm/lib/Target/IA64/IA64ISelPattern.cpp b/llvm/lib/Target/IA64/IA64ISelPattern.cpp
index e2a5a988d6c..d19b68368f2 100644
--- a/llvm/lib/Target/IA64/IA64ISelPattern.cpp
+++ b/llvm/lib/Target/IA64/IA64ISelPattern.cpp
@@ -453,9 +453,6 @@ void ISel::InstructionSelectBasicBlock(SelectionDAG &DAG) {
ISelDAG = 0;
}
-const char sign[2]={'+','-'};
-
-
// strip leading '0' characters from a string
void munchLeadingZeros(std::string& inString) {
while(inString.c_str()[0]=='0') {
@@ -564,7 +561,8 @@ unsigned lefevre(const std::string inString,
}
std::string t, u;
- int c,f;
+ int c;
+ bool f;
std::map<const int, int> w;
for(int i=0; i<p.size(); i++) {
@@ -678,18 +676,19 @@ unsigned lefevre(const std::string inString,
}
if( c<0 ) {
- f=1;
+ f=true;
c=-c;
} else
- f=0;
+ f=false;
bool hit=true;
- for(int i=0; i<u.length()-1; i++) {
- if(u.c_str()[i]!='0')
- hit=false;
+ for(int i=0; i<u.length(); i++) {
+ if(u[i]!='0')
+ if(u[i]!='N') {
+ hit=false;
+ break;
+ }
}
- if(u.c_str()[u.length()-1]!='N')
- hit=false;
int g=0;
if(hit) {
OpenPOWER on IntegriCloud