mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 01:38:26 +00:00
Do not use the type of the RHS constant to determine the type of the operation.
This fails for shifts because the constant is always 8 bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19508 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a23ccfb124
commit
48034fd9f1
@ -2271,7 +2271,7 @@ void ISel::Select(SDOperand N) {
|
||||
SDOperand Op0 = Op.getOperand(0);
|
||||
SDOperand Op1 = Op.getOperand(1);
|
||||
if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Op1)) {
|
||||
switch (CN->getValueType(0)) {
|
||||
switch (Op0.getValueType()) { // Use Op0's type because of shifts.
|
||||
default: break;
|
||||
case MVT::i1:
|
||||
case MVT::i8: Opc = TabPtr[0]; break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user