[llvm] r174374 - Revert r174343, "When the target-independent DAGCombiner inferred a higher alignment for a load, "
NAKAMURA Takumi
geek4civic at gmail.com
Tue Feb 5 06:44:16 PST 2013
Author: chapuni
Date: Tue Feb 5 08:44:16 2013
New Revision: 174374
URL: http://llvm.org/viewvc/llvm-project?rev=174374&view=rev
Log:
Revert r174343, "When the target-independent DAGCombiner inferred a higher alignment for a load,"
It caused hangups in compiling clang/lib/Parse/ParseDecl.cpp and clang/lib/Driver/Tools.cpp in stage2 on some hosts.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/trunk/test/CodeGen/AArch64/func-argpassing.ll
llvm/trunk/test/CodeGen/X86/divide-by-constant.ll
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=174374&r1=174373&r2=174374&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Feb 5 08:44:16 2013
@@ -7199,15 +7199,12 @@ SDValue DAGCombiner::visitLOAD(SDNode *N
// Try to infer better alignment information than the load already has.
if (OptLevel != CodeGenOpt::None && LD->isUnindexed()) {
if (unsigned Align = DAG.InferPtrAlignment(Ptr)) {
- if (Align > LD->getAlignment()) {
- SDValue NewLoad =
- DAG.getExtLoad(LD->getExtensionType(), N->getDebugLoc(),
+ if (Align > LD->getAlignment())
+ return DAG.getExtLoad(LD->getExtensionType(), N->getDebugLoc(),
LD->getValueType(0),
Chain, Ptr, LD->getPointerInfo(),
LD->getMemoryVT(),
LD->isVolatile(), LD->isNonTemporal(), Align);
- return CombineTo(N, NewLoad, SDValue(NewLoad.getNode(), 1), true);
- }
}
}
Modified: llvm/trunk/test/CodeGen/AArch64/func-argpassing.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/func-argpassing.ll?rev=174374&r1=174373&r2=174374&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/func-argpassing.ll (original)
+++ llvm/trunk/test/CodeGen/AArch64/func-argpassing.ll Tue Feb 5 08:44:16 2013
@@ -178,8 +178,7 @@ define void @check_i128_stackalign(i32 %
; Nothing local on stack in current codegen, so first stack is 16 away
; CHECK: ldr {{x[0-9]+}}, [sp, #16]
; Important point is that we address sp+24 for second dword
-; CHECK: add [[REG:x[0-9]+]], sp, #16
-; CHECK: ldr {{x[0-9]+}}, {{\[}}[[REG]], #8]
+; CHECK: ldr {{x[0-9]+}}, [sp, #24]
ret void
}
Modified: llvm/trunk/test/CodeGen/X86/divide-by-constant.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/divide-by-constant.ll?rev=174374&r1=174373&r2=174374&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/divide-by-constant.ll (original)
+++ llvm/trunk/test/CodeGen/X86/divide-by-constant.ll Tue Feb 5 08:44:16 2013
@@ -56,9 +56,9 @@ entry:
%div = sdiv i16 %x, 10
ret i16 %div
; CHECK: test6:
-; CHECK: imull $26215, %eax, %ecx
-; CHECK: sarl $18, %ecx
-; CHECK: shrl $15, %eax
+; CHECK: imull $26215, %eax, %eax
+; CHECK: shrl $31, %ecx
+; CHECK: sarl $18, %eax
}
define i32 @test7(i32 %x) nounwind {
More information about the llvm-commits
mailing list