diff options
| author | Dan Gohman <gohman@apple.com> | 2008-12-20 17:19:40 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-12-20 17:19:40 +0000 |
| commit | ab316350bfe4b17b404cace73c0d77f0d6d09a63 (patch) | |
| tree | f0746e4e04a7c311f3e118c826d35e4e0fc33952 /llvm/lib/Target/X86/X86FastISel.cpp | |
| parent | a12f1159729aacff516d9f3fa1d6bc3bea1a49d4 (diff) | |
| download | bcm5719-llvm-ab316350bfe4b17b404cace73c0d77f0d6d09a63.tar.gz bcm5719-llvm-ab316350bfe4b17b404cace73c0d77f0d6d09a63.zip | |
Fix fast-isel to not emit invalid assembly when presented with a
constant shift count that doesn't fit in the shift instruction's
immediate field. This fixes PR3242.
llvm-svn: 61281
Diffstat (limited to 'llvm/lib/Target/X86/X86FastISel.cpp')
| -rw-r--r-- | llvm/lib/Target/X86/X86FastISel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp index c4b45bf431e..a81ecfeace1 100644 --- a/llvm/lib/Target/X86/X86FastISel.cpp +++ b/llvm/lib/Target/X86/X86FastISel.cpp @@ -893,7 +893,7 @@ bool X86FastISel::X86SelectShift(Instruction *I) { if (ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1))) { unsigned ResultReg = createResultReg(RC); BuildMI(MBB, TII.get(OpImm), - ResultReg).addReg(Op0Reg).addImm(CI->getZExtValue()); + ResultReg).addReg(Op0Reg).addImm(CI->getZExtValue() & 0xff); UpdateValueMap(I, ResultReg); return true; } |

