diff options
| author | Duncan Sands <baldrick@free.fr> | 2008-06-08 20:54:56 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2008-06-08 20:54:56 +0000 |
| commit | 11dd42453935c5f92bf7b4501c863a9e399031ef (patch) | |
| tree | 932fcffde0f3ef41f1349d489a7b29044c3822cd /llvm/lib/Transforms | |
| parent | b4866ef30c291ef73bcb7e574e07a72b5362da04 (diff) | |
| download | bcm5719-llvm-11dd42453935c5f92bf7b4501c863a9e399031ef.tar.gz bcm5719-llvm-11dd42453935c5f92bf7b4501c863a9e399031ef.zip | |
Remove comparison methods for MVT. The main cause
of apint codegen failure is the DAG combiner doing
the wrong thing because it was comparing MVT's using
< rather than comparing the number of bits. Removing
the < method makes this mistake impossible to commit.
Instead, add helper methods for comparing bits and use
them.
llvm-svn: 52098
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index 4727c618bcb..e5d49474653 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -339,10 +339,10 @@ static bool OptimizeNoopCopyExpression(CastInst *CI, const TargetLowering &TLI){ // This is an fp<->int conversion? if (SrcVT.isInteger() != DstVT.isInteger()) return false; - + // If this is an extension, it will be a zero or sign extension, which // isn't a noop. - if (SrcVT < DstVT) return false; + if (SrcVT.bitsLT(DstVT)) return false; // If these values will be promoted, find out what they will be promoted // to. This helps us consider truncates on PPC as noop copies when they |

