From ae3a0be92e33bc716722aa600983fc1535acb122 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 4 Jun 2009 22:49:04 +0000 Subject: Split the Add, Sub, and Mul instruction opcodes into separate integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../PowerPC/2006-01-11-darwin-fp-argument.ll | 2 +- .../PowerPC/2006-10-11-combiner-aa-regression.ll | 6 +- test/CodeGen/PowerPC/2007-03-30-SpillerCrash.ll | 88 +++++++++++----------- test/CodeGen/PowerPC/2007-11-19-VectorSplitting.ll | 4 +- test/CodeGen/PowerPC/2008-07-15-Fabs.ll | 8 +- test/CodeGen/PowerPC/2008-07-17-Fneg.ll | 2 +- test/CodeGen/PowerPC/2008-09-12-CoalescerBug.ll | 40 +++++----- test/CodeGen/PowerPC/2008-10-28-UnprocessedNode.ll | 6 +- test/CodeGen/PowerPC/2008-10-28-f128-i32.ll | 6 +- test/CodeGen/PowerPC/buildvec_canonicalize.ll | 2 +- test/CodeGen/PowerPC/fma.ll | 40 +++++----- test/CodeGen/PowerPC/fnabs.ll | 2 +- test/CodeGen/PowerPC/fneg.ll | 8 +- test/CodeGen/PowerPC/int-fp-conv-1.ll | 2 +- test/CodeGen/PowerPC/itofp128.ll | 2 +- test/CodeGen/PowerPC/mem-rr-addr-mode.ll | 4 +- test/CodeGen/PowerPC/multiple-return-values.ll | 2 +- test/CodeGen/PowerPC/ppcf128-1-opt.ll | 6 +- test/CodeGen/PowerPC/ppcf128-1.ll | 6 +- test/CodeGen/PowerPC/ppcf128-2.ll | 2 +- test/CodeGen/PowerPC/ppcf128-4.ll | 4 +- test/CodeGen/PowerPC/return-val-i128.ll | 2 +- test/CodeGen/PowerPC/unsafe-math.ll | 4 +- test/CodeGen/PowerPC/vec_fneg.ll | 2 +- test/CodeGen/PowerPC/vec_splat.ll | 2 +- test/CodeGen/PowerPC/vec_zero.ll | 2 +- test/CodeGen/PowerPC/vector.ll | 20 ++--- 27 files changed, 137 insertions(+), 137 deletions(-) (limited to 'test/CodeGen/PowerPC') diff --git a/test/CodeGen/PowerPC/2006-01-11-darwin-fp-argument.ll b/test/CodeGen/PowerPC/2006-01-11-darwin-fp-argument.ll index e2f06f5..1b3bde8 100644 --- a/test/CodeGen/PowerPC/2006-01-11-darwin-fp-argument.ll +++ b/test/CodeGen/PowerPC/2006-01-11-darwin-fp-argument.ll @@ -5,6 +5,6 @@ target triple = "powerpc-apple-darwin8.2.0" ; Dead argument should reserve an FP register. define double @bar(double %DEAD, double %X, double %Y) { - %tmp.2 = add double %X, %Y ; [#uses=1] + %tmp.2 = fadd double %X, %Y ; [#uses=1] ret double %tmp.2 } diff --git a/test/CodeGen/PowerPC/2006-10-11-combiner-aa-regression.ll b/test/CodeGen/PowerPC/2006-10-11-combiner-aa-regression.ll index a58cd16..7a65c00 100644 --- a/test/CodeGen/PowerPC/2006-10-11-combiner-aa-regression.ll +++ b/test/CodeGen/PowerPC/2006-10-11-combiner-aa-regression.ll @@ -9,15 +9,15 @@ define void @offset(%struct.Point* %pt, double %x, double %y, double %z) { entry: %tmp = getelementptr %struct.Point* %pt, i32 0, i32 0 ; [#uses=2] %tmp.upgrd.1 = load double* %tmp ; [#uses=1] - %tmp2 = add double %tmp.upgrd.1, %x ; [#uses=1] + %tmp2 = fadd double %tmp.upgrd.1, %x ; [#uses=1] store double %tmp2, double* %tmp %tmp6 = getelementptr %struct.Point* %pt, i32 0, i32 1 ; [#uses=2] %tmp7 = load double* %tmp6 ; [#uses=1] - %tmp9 = add double %tmp7, %y ; [#uses=1] + %tmp9 = fadd double %tmp7, %y ; [#uses=1] store double %tmp9, double* %tmp6 %tmp13 = getelementptr %struct.Point* %pt, i32 0, i32 2 ; [#uses=2] %tmp14 = load double* %tmp13 ; [#uses=1] - %tmp16 = add double %tmp14, %z ; [#uses=1] + %tmp16 = fadd double %tmp14, %z ; [#uses=1] store double %tmp16, double* %tmp13 ret void } diff --git a/test/CodeGen/PowerPC/2007-03-30-SpillerCrash.ll b/test/CodeGen/PowerPC/2007-03-30-SpillerCrash.ll index 04ca3bb..637208b 100644 --- a/test/CodeGen/PowerPC/2007-03-30-SpillerCrash.ll +++ b/test/CodeGen/PowerPC/2007-03-30-SpillerCrash.ll @@ -604,10 +604,10 @@ xPIF.exit: ; preds = %.critedge7898, %xOperationInitMasks.exit shufflevector <4 x float> %583, <4 x float> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x float>>:589 [#uses=1] shufflevector <4 x float> %585, <4 x float> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x float>>:590 [#uses=1] shufflevector <4 x float> %588, <4 x float> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x float>>:591 [#uses=1] - mul <4 x float> zeroinitializer, %589 ; <<4 x float>>:592 [#uses=0] - mul <4 x float> zeroinitializer, %590 ; <<4 x float>>:593 [#uses=0] - mul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:594 [#uses=1] - mul <4 x float> zeroinitializer, %591 ; <<4 x float>>:595 [#uses=0] + fmul <4 x float> zeroinitializer, %589 ; <<4 x float>>:592 [#uses=0] + fmul <4 x float> zeroinitializer, %590 ; <<4 x float>>:593 [#uses=0] + fmul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:594 [#uses=1] + fmul <4 x float> zeroinitializer, %591 ; <<4 x float>>:595 [#uses=0] getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 0 ; <<4 x float>*>:596 [#uses=2] load <4 x float>* %596 ; <<4 x float>>:597 [#uses=0] store <4 x float> zeroinitializer, <4 x float>* %596 @@ -621,8 +621,8 @@ xPIF.exit: ; preds = %.critedge7898, %xOperationInitMasks.exit load <4 x float>* null ; <<4 x float>>:604 [#uses=1] getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 2 ; <<4 x float>*>:605 [#uses=1] load <4 x float>* %605 ; <<4 x float>>:606 [#uses=1] - sub <4 x float> zeroinitializer, %604 ; <<4 x float>>:607 [#uses=2] - sub <4 x float> zeroinitializer, %606 ; <<4 x float>>:608 [#uses=2] + fsub <4 x float> zeroinitializer, %604 ; <<4 x float>>:607 [#uses=2] + fsub <4 x float> zeroinitializer, %606 ; <<4 x float>>:608 [#uses=2] call i32 @llvm.ppc.altivec.vcmpequw.p( i32 0, <4 x i32> zeroinitializer, <4 x i32> zeroinitializer ) ; :609 [#uses=0] br i1 false, label %617, label %610 @@ -672,21 +672,21 @@ xST.exit400: ; preds = %633, %625, %610 load <4 x float>* null ; <<4 x float>>:638 [#uses=2] getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 0, i32 2 ; <<4 x float>*>:639 [#uses=0] load <4 x float>* null ; <<4 x float>>:640 [#uses=2] - mul <4 x float> %638, %638 ; <<4 x float>>:641 [#uses=1] - mul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:642 [#uses=0] - mul <4 x float> %640, %640 ; <<4 x float>>:643 [#uses=2] + fmul <4 x float> %638, %638 ; <<4 x float>>:641 [#uses=1] + fmul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:642 [#uses=0] + fmul <4 x float> %640, %640 ; <<4 x float>>:643 [#uses=2] shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> < i32 1, i32 1, i32 1, i32 1 > ; <<4 x float>>:644 [#uses=0] shufflevector <4 x float> %643, <4 x float> undef, <4 x i32> < i32 1, i32 1, i32 1, i32 1 > ; <<4 x float>>:645 [#uses=1] - add <4 x float> %645, %643 ; <<4 x float>>:646 [#uses=0] + fadd <4 x float> %645, %643 ; <<4 x float>>:646 [#uses=0] shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> < i32 2, i32 2, i32 2, i32 2 > ; <<4 x float>>:647 [#uses=1] shufflevector <4 x float> %641, <4 x float> undef, <4 x i32> < i32 2, i32 2, i32 2, i32 2 > ; <<4 x float>>:648 [#uses=1] - add <4 x float> zeroinitializer, %647 ; <<4 x float>>:649 [#uses=2] - add <4 x float> zeroinitializer, %648 ; <<4 x float>>:650 [#uses=0] - add <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:651 [#uses=2] + fadd <4 x float> zeroinitializer, %647 ; <<4 x float>>:649 [#uses=2] + fadd <4 x float> zeroinitializer, %648 ; <<4 x float>>:650 [#uses=0] + fadd <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:651 [#uses=2] call <4 x float> @llvm.ppc.altivec.vrsqrtefp( <4 x float> %649 ) ; <<4 x float>>:652 [#uses=1] - mul <4 x float> %652, %649 ; <<4 x float>>:653 [#uses=1] + fmul <4 x float> %652, %649 ; <<4 x float>>:653 [#uses=1] call <4 x float> @llvm.ppc.altivec.vrsqrtefp( <4 x float> %651 ) ; <<4 x float>>:654 [#uses=1] - mul <4 x float> %654, %651 ; <<4 x float>>:655 [#uses=0] + fmul <4 x float> %654, %651 ; <<4 x float>>:655 [#uses=0] icmp eq i32 0, 0 ; :656 [#uses=1] br i1 %656, label %665, label %657 @@ -721,9 +721,9 @@ xST.exit402: ; preds = %669, %657 load <4 x float>* null ; <<4 x float>>:676 [#uses=0] shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>>:677 [#uses=1] shufflevector <4 x float> %675, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>>:678 [#uses=1] - mul <4 x float> zeroinitializer, %677 ; <<4 x float>>:679 [#uses=0] - mul <4 x float> zeroinitializer, %678 ; <<4 x float>>:680 [#uses=0] - mul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:681 [#uses=1] + fmul <4 x float> zeroinitializer, %677 ; <<4 x float>>:679 [#uses=0] + fmul <4 x float> zeroinitializer, %678 ; <<4 x float>>:680 [#uses=0] + fmul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:681 [#uses=1] icmp eq i32 0, 0 ; :682 [#uses=1] br i1 %682, label %689, label %683 @@ -750,7 +750,7 @@ xST.exit405: ; preds = %689, %683 load <4 x float>* null ; <<4 x float>>:698 [#uses=0] getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 5, i32 2 ; <<4 x float>*>:699 [#uses=0] shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>>:700 [#uses=1] - add <4 x float> zeroinitializer, %700 ; <<4 x float>>:701 [#uses=0] + fadd <4 x float> zeroinitializer, %700 ; <<4 x float>>:701 [#uses=0] load <4 x i32>* %.sub7896 ; <<4 x i32>>:702 [#uses=1] call i32 @llvm.ppc.altivec.vcmpequw.p( i32 0, <4 x i32> %702, <4 x i32> zeroinitializer ) ; :703 [#uses=0] getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 1, i32 1 ; <<4 x float>*>:704 [#uses=2] @@ -769,7 +769,7 @@ xST.exit405: ; preds = %689, %683 getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 2 ; <<4 x float>*>:714 [#uses=1] load <4 x float>* %714 ; <<4 x float>>:715 [#uses=0] shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>>:716 [#uses=0] - mul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:717 [#uses=1] + fmul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:717 [#uses=1] load <4 x i32>* %.sub7896 ; <<4 x i32>>:718 [#uses=0] getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 5, i32 0 ; <<4 x float>*>:719 [#uses=1] store <4 x float> zeroinitializer, <4 x float>* %719 @@ -791,10 +791,10 @@ xST.exit405: ; preds = %689, %683 load <4 x float>* %732 ; <<4 x float>>:733 [#uses=0] getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 3 ; <<4 x float>*>:734 [#uses=0] shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>>:735 [#uses=1] - mul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:736 [#uses=1] - mul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:737 [#uses=1] - mul <4 x float> zeroinitializer, %735 ; <<4 x float>>:738 [#uses=1] - mul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:739 [#uses=1] + fmul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:736 [#uses=1] + fmul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:737 [#uses=1] + fmul <4 x float> zeroinitializer, %735 ; <<4 x float>>:738 [#uses=1] + fmul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:739 [#uses=1] call i32 @llvm.ppc.altivec.vcmpequw.p( i32 0, <4 x i32> zeroinitializer, <4 x i32> zeroinitializer ) ; :740 [#uses=1] icmp eq i32 %740, 0 ; :741 [#uses=0] getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 0 ; <<4 x float>*>:742 [#uses=2] @@ -821,9 +821,9 @@ xST.exit405: ; preds = %689, %683 getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 3 ; <<4 x float>*>:761 [#uses=0] shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>>:762 [#uses=0] shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>>:763 [#uses=1] - add <4 x float> %757, zeroinitializer ; <<4 x float>>:764 [#uses=0] - add <4 x float> %758, %763 ; <<4 x float>>:765 [#uses=0] - mul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:766 [#uses=1] + fadd <4 x float> %757, zeroinitializer ; <<4 x float>>:764 [#uses=0] + fadd <4 x float> %758, %763 ; <<4 x float>>:765 [#uses=0] + fmul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:766 [#uses=1] br i1 false, label %773, label %767 ;