Fix a reassociate crash on sozefx when compiling with dragonegg+gcc-4.7 due to

the optimizers producing a multiply expression with more multiplications than
the original (!).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159426 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands
2012-06-29 13:25:06 +00:00
parent 06cb8ed006
commit 96d2eff5c6
2 changed files with 24 additions and 5 deletions

View File

@@ -133,3 +133,14 @@ define i8 @f0(i8 %x) {
%t7 = mul i8 %t6, %t0
ret i8 %t7
}
define i32 @sozefx_(i32 %x, i32 %y) {
%t0 = sub i32 %x, %x
%t1 = mul i32 %t0, %t0
%t2 = mul i32 %x, %t0
%t3 = mul i32 %t1, %t1
%t4 = add i32 %t2, %t3
%t5 = mul i32 %x, %y
%t6 = add i32 %t4, %t5
ret i32 %t6
}