From 161b7b66acf5664f25dfedac867286a62219fd9f Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 20 Jan 2009 01:06:45 +0000 Subject: Fix a dagcombine to not generate loads of non-round integer types, as its comment says, even in the case where it will be generating extending loads. This fixes PR3216. llvm-svn: 62557 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 0d90fc07487..6c5d386f029 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3343,7 +3343,7 @@ SDValue DAGCombiner::ReduceLoadWidth(SDNode *N) { // Do not generate loads of non-round integer types since these can // be expensive (and would be wrong if the type is not byte sized). - if (isa(N0) && N0.hasOneUse() && VT.isRound() && + if (isa(N0) && N0.hasOneUse() && EVT.isRound() && cast(N0)->getMemoryVT().getSizeInBits() > EVTBits && // Do not change the width of a volatile load. !cast(N0)->isVolatile()) { -- cgit v1.2.3