1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Do not create ZEXTLOAD's unless we are before legalize or the operation is

legal.

llvm-svn: 27402
This commit is contained in:
Chris Lattner 2006-04-04 17:39:18 +00:00
parent 1a4d5e9b56
commit cad2bfa3d7

View File

@ -1193,7 +1193,8 @@ SDOperand DAGCombiner::visitAND(SDNode *N) {
LoadedVT = N0.getOpcode() == ISD::LOAD ? VT : LoadedVT = N0.getOpcode() == ISD::LOAD ? VT :
cast<VTSDNode>(N0.getOperand(3))->getVT(); 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(); MVT::ValueType PtrType = N0.getOperand(1).getValueType();
// For big endian targets, we need to add an offset to the pointer to load // 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 // the correct bytes. For little endian systems, we merely need to read