diff options
Diffstat (limited to 'lib/Target/R600/AMDGPUInstructions.td')
-rw-r--r-- | lib/Target/R600/AMDGPUInstructions.td | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/Target/R600/AMDGPUInstructions.td b/lib/Target/R600/AMDGPUInstructions.td index 14bfd8cc18..b86b7818fc 100644 --- a/lib/Target/R600/AMDGPUInstructions.td +++ b/lib/Target/R600/AMDGPUInstructions.td @@ -524,10 +524,17 @@ class RcpPat<Instruction RcpInst, ValueType vt> : Pat < (RcpInst $src) >; -class RsqPat<Instruction RsqInst, ValueType vt> : Pat < - (AMDGPUrcp (fsqrt vt:$src)), - (RsqInst $src) ->; +multiclass RsqPat<Instruction RsqInst, ValueType vt> { + def : Pat < + (fdiv FP_ONE, (fsqrt vt:$src)), + (RsqInst $src) + >; + + def : Pat < + (AMDGPUrcp (fsqrt vt:$src)), + (RsqInst $src) + >; +} include "R600Instructions.td" include "R700Instructions.td" |