[Mesa-dev] [PATCH 1/7] radeon/llvm: add a pattern for fsqrt
Vincent Lejeune
vljn at ovi.com
Mon Oct 8 07:47:07 PDT 2012
---
src/gallium/drivers/radeon/R600Instructions.td | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td
index 1689a2f..01a5bba 100644
--- a/src/gallium/drivers/radeon/R600Instructions.td
+++ b/src/gallium/drivers/radeon/R600Instructions.td
@@ -1018,6 +1018,9 @@ let Predicates = [isEGorCayman] in {
def : Pat<(fp_to_uint R600_Reg32:$src),
(FLT_TO_UINT_eg (TRUNC R600_Reg32:$src))>;
+ def : Pat<(fsqrt R600_Reg32:$src),
+ (MUL R600_Reg32:$src, (RECIPSQRT_CLAMPED_eg R600_Reg32:$src))>;
+
//===----------------------------------------------------------------------===//
// Memory read/write instructions
//===----------------------------------------------------------------------===//
--
1.7.11.4
More information about the mesa-dev
mailing list