Re-apply r113679, which was reverted in r113720, which added a paid of new instcombine transforms

to expose greater opportunities for store narrowing in codegen.  This patch fixes a potential
infinite loop in instcombine caused by one of the introduced transforms being overly aggressive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113763 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2010-09-13 17:59:27 +00:00
parent becf392e3b
commit 2c5f19db2e
5 changed files with 57 additions and 38 deletions
-16
View File
@@ -15,22 +15,6 @@ entry:
ret i32 %add
}
define float @fp_ops(float %a, float %b) nounwind {
entry:
%a.addr = alloca float, align 4
%b.addr = alloca float, align 4
store float %a, float* %a.addr
store float %b, float* %b.addr
%tmp = load float* %a.addr
%tmp1 = load float* %b.addr
%mul = fmul float %tmp, %tmp1
%tmp2 = load float* %b.addr
%tmp3 = load float* %a.addr
%mul2 = fmul float %tmp2, %tmp3
%add = fadd float %mul, %mul2
ret float %mul
}
define i32* @foo(i32* %p, i32* %q, i32** %z) nounwind {
entry:
%r = load i32* %p