diff options
| author | Scott Michel <scottm@aero.org> | 2008-03-20 00:51:36 +0000 |
|---|---|---|
| committer | Scott Michel <scottm@aero.org> | 2008-03-20 00:51:36 +0000 |
| commit | bbaf3edace625a1d97aa25f2838381486f20ce25 (patch) | |
| tree | 9c7fe65c71f2ec52cbbd4dae764f84c41979cfa5 /llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp | |
| parent | 5daf090a1a50088b27b034525f83da7d185b454f (diff) | |
| download | bcm5719-llvm-bbaf3edace625a1d97aa25f2838381486f20ce25.tar.gz bcm5719-llvm-bbaf3edace625a1d97aa25f2838381486f20ce25.zip | |
Add more patterns to match in the integer comparison test harnesses.
Fix bugs encountered, mostly due to range matching for immediates;
the CellSPU's 10-bit immediates are sign extended, covering a
larger range of unsigned values.
llvm-svn: 48575
Diffstat (limited to 'llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp')
| -rw-r--r-- | llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp b/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp index 1d4b28b4c53..b81f277d55f 100644 --- a/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp +++ b/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp @@ -65,14 +65,14 @@ namespace { bool isI32IntU10Immediate(ConstantSDNode *CN) { - return isU10Constant((int) CN->getValue()); + return isU10Constant(CN->getSignExtended()); } //! ConstantSDNode predicate for i16 sign-extended, 10-bit immediate values bool isI16IntS10Immediate(ConstantSDNode *CN) { - return isS10Constant((short) CN->getValue()); + return isS10Constant(CN->getSignExtended()); } //! SDNode predicate for i16 sign-extended, 10-bit immediate values |

