[Mesa-dev] [PATCH] AMDGPU: Match fdiv for SI.
Michel Dänzer
michel at daenzer.net
Thu Dec 6 02:02:35 PST 2012
From: Michel Dänzer <michel.daenzer at amd.com>
Fixes hundreds of radeonsi piglit regressions from commit
62c8e1ec4a93b28c55c1c7accb6cbd64952e59c2 ('AMDGPU: replace int_AMDGPU_rcp by
fdiv (1.0, x) in RECIP pattern').
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
lib/Target/AMDGPU/SIInstructions.td | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td
index e9bbe23..3564ec3 100644
--- a/lib/Target/AMDGPU/SIInstructions.td
+++ b/lib/Target/AMDGPU/SIInstructions.td
@@ -1264,6 +1264,11 @@ def : Pat <
(V_MUL_LEGACY_F32_e32 AllReg_32:$src0, (V_RCP_LEGACY_F32_e32 AllReg_32:$src1))
>;
+def : Pat<
+ (fdiv AllReg_32:$src0, AllReg_32:$src1),
+ (V_MUL_F32_e32 AllReg_32:$src0, (V_RCP_F32_e32 AllReg_32:$src1))
+>;
+
def : Pat <
(int_AMDGPU_kilp),
(SI_KIL (V_MOV_IMM_I32 0xbf800000))
--
1.7.10.4
More information about the mesa-dev
mailing list