mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
Fix DAGCombiner to avoid folding a sext-in-reg or similar through a shl
in order to fold it into a load. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118471 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -4120,6 +4120,7 @@ SDValue DAGCombiner::ReduceLoadWidth(SDNode *N) {
|
||||
// we can fold the truncate through the shift.
|
||||
unsigned ShLeftAmt = 0;
|
||||
if (ShAmt == 0 && N0.getOpcode() == ISD::SHL && N0.hasOneUse() &&
|
||||
ExtVT == VT &&
|
||||
TLI.isNarrowingProfitable(N0.getValueType(), VT)) {
|
||||
if (ConstantSDNode *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1))) {
|
||||
ShLeftAmt = N01->getZExtValue();
|
||||
|
Reference in New Issue
Block a user