From 0231007269c675ac12178cf675639ff95ee106f8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 20 Apr 2006 05:58:10 +0000 Subject: [PATCH] Make sure that the new instructions selected have the right type. This fixes 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Target/PowerPC/PPCInstrAltivec.td b/lib/Target/PowerPC/PPCInstrAltivec.td index 2cb4cdac22d..1e9ea47385f 100644 --- a/lib/Target/PowerPC/PPCInstrAltivec.td +++ b/lib/Target/PowerPC/PPCInstrAltivec.td @@ -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))>; -- 2.34.1