mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 21:35:07 +00:00
Do not create ZEXTLOAD's unless we are before legalize or the operation is
legal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27402 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cecc3ebcc8
commit
e44be60ee9
@ -1193,7 +1193,8 @@ SDOperand DAGCombiner::visitAND(SDNode *N) {
|
||||
|
||||
LoadedVT = N0.getOpcode() == ISD::LOAD ? VT :
|
||||
cast<VTSDNode>(N0.getOperand(3))->getVT();
|
||||
if (EVT != MVT::Other && LoadedVT > EVT) {
|
||||
if (EVT != MVT::Other && LoadedVT > EVT &&
|
||||
(!AfterLegalize || TLI.isOperationLegal(ISD::ZEXTLOAD, EVT))) {
|
||||
MVT::ValueType PtrType = N0.getOperand(1).getValueType();
|
||||
// For big endian targets, we need to add an offset to the pointer to load
|
||||
// the correct bytes. For little endian systems, we merely need to read
|
||||
|
Loading…
x
Reference in New Issue
Block a user