mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Do not try to create a MVT type of width 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72557 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4937,6 +4937,8 @@ SDValue DAGCombiner::ReduceLoadOpStoreWidth(SDNode *N) {
|
||||
APInt Imm = cast<ConstantSDNode>(N1)->getAPIntValue();
|
||||
if (Opc == ISD::AND)
|
||||
Imm ^= APInt::getAllOnesValue(BitWidth);
|
||||
if (Imm == 0 || Imm.isAllOnesValue())
|
||||
return SDValue();
|
||||
unsigned ShAmt = Imm.countTrailingZeros();
|
||||
unsigned MSB = BitWidth - Imm.countLeadingZeros() - 1;
|
||||
unsigned NewBW = NextPowerOf2(MSB - ShAmt);
|
||||
|
||||
Reference in New Issue
Block a user