Make sure that the new instructions selected have the right type. This fixes
authorChris Lattner <sabre@nondot.org>
Thu, 20 Apr 2006 05:58:10 +0000 (05:58 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 20 Apr 2006 05:58:10 +0000 (05:58 +0000)
CodeGen/PowerPC/2006-04-19-vmaddfp-crash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27868 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCInstrAltivec.td

index 2cb4cdac22dc9733290b01d852f1518e00a1a5cc..1e9ea47385f8fa0c0904248d2c7d6cbcdd07dde7 100644 (file)
@@ -603,20 +603,20 @@ def : Pat<(v4i32 (and VRRC:$A, (vnot_conv VRRC:$B))),
           (v4i32 (VANDC VRRC:$A, VRRC:$B))>;
 
 def : Pat<(fmul VRRC:$vA, VRRC:$vB),
-          (VMADDFP VRRC:$vA, VRRC:$vB, (v4i32 (V_SET0)))>; 
+          (v4f32 (VMADDFP VRRC:$vA, VRRC:$vB, (v4f32 (V_SET0))))>; 
 
 // Fused multiply add and multiply sub for packed float.  These are represented
 // separately from the real instructions above, for operations that must have
 // the additional precision, such as Newton-Rhapson (used by divide, sqrt)
 def : Pat<(PPCvmaddfp VRRC:$A, VRRC:$B, VRRC:$C),
-          (VMADDFP VRRC:$A, VRRC:$B, VRRC:$C)>;
+          (v4f32 (VMADDFP VRRC:$A, VRRC:$B, VRRC:$C))>;
 def : Pat<(PPCvnmsubfp VRRC:$A, VRRC:$B, VRRC:$C),
-          (VNMSUBFP VRRC:$A, VRRC:$B, VRRC:$C)>;
+          (v4f32 (VNMSUBFP VRRC:$A, VRRC:$B, VRRC:$C))>;
 
 def : Pat<(int_ppc_altivec_vmaddfp VRRC:$A, VRRC:$B, VRRC:$C),
-          (VMADDFP VRRC:$A, VRRC:$B, VRRC:$C)>;
+          (v4f32 (VMADDFP VRRC:$A, VRRC:$B, VRRC:$C))>;
 def : Pat<(int_ppc_altivec_vnmsubfp VRRC:$A, VRRC:$B, VRRC:$C),
-          (VNMSUBFP VRRC:$A, VRRC:$B, VRRC:$C)>;
+          (v4f32 (VNMSUBFP VRRC:$A, VRRC:$B, VRRC:$C))>;
 
 def : Pat<(PPCvperm (v16i8 VRRC:$vA), VRRC:$vB, VRRC:$vC),
           (v16i8 (VPERM VRRC:$vA, VRRC:$vB, VRRC:$vC))>;