mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Don't generate sbfx / ubfx with negative lsb field. Patch by David Conrad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1287,7 +1287,7 @@ SDNode *ARMDAGToDAGISel::SelectV6T2BitfieldExtractOp(SDValue Op,
|
||||
assert(Srl_imm > 0 && Srl_imm < 32 && "bad amount in shift node!");
|
||||
unsigned Width = 32 - Srl_imm;
|
||||
int LSB = Srl_imm - Shl_imm;
|
||||
if ((LSB + Width) > 32)
|
||||
if (LSB < 0)
|
||||
return NULL;
|
||||
SDValue Reg0 = CurDAG->getRegister(0, MVT::i32);
|
||||
SDValue Ops[] = { Op.getOperand(0).getOperand(0),
|
||||
|
Reference in New Issue
Block a user