diff options
author | Duraid Madina <duraid@octopus.com.au> | 2005-04-26 09:42:50 +0000 |
---|---|---|
committer | Duraid Madina <duraid@octopus.com.au> | 2005-04-26 09:42:50 +0000 |
commit | 4706c0395b693c64bda4c478517fed71c2e9a0dc (patch) | |
tree | 7b5cdd90cafe20c4ccadc7d803cf761ddc14c8c1 | |
parent | 3b84bac3efc9f8bc2925f8ec55ba87b16e4423d4 (diff) |
constmul bugfix: multiply by 27611 was broken
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21564 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/IA64/IA64ISelPattern.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/Target/IA64/IA64ISelPattern.cpp b/lib/Target/IA64/IA64ISelPattern.cpp index e2a5a988d6..d19b68368f 100644 --- a/lib/Target/IA64/IA64ISelPattern.cpp +++ b/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) { |