summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/SIInstructions.td
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/R600/SIInstructions.td')
-rw-r--r--llvm/lib/Target/R600/SIInstructions.td10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Target/R600/SIInstructions.td b/llvm/lib/Target/R600/SIInstructions.td
index af8d3b3d080..8d2c212dc15 100644
--- a/llvm/lib/Target/R600/SIInstructions.td
+++ b/llvm/lib/Target/R600/SIInstructions.td
@@ -2328,12 +2328,20 @@ def : Pat <
// TODO: Look into not implementing isFNegFree/isFAbsFree for SI, and possibly
// removing these patterns
-
def : Pat <
(fneg (fabs f32:$src)),
(V_OR_B32_e32 $src, (V_MOV_B32_e32 0x80000000)) /* Set sign bit */
>;
+def : Pat <
+ (fneg (fabs f64:$src)),
+ (f64 (INSERT_SUBREG
+ (INSERT_SUBREG (f64 (IMPLICIT_DEF)),
+ (i32 (EXTRACT_SUBREG f64:$src, sub0)), sub0),
+ (V_OR_B32_e32 (S_MOV_B32 0x80000000),
+ (EXTRACT_SUBREG f64:$src, sub1)), sub1)) // Set sign bit.
+>;
+
class SIUnaryCustomInsertInst<string name, SDPatternOperator node,
ValueType vt,
RegisterClass dstrc,
OpenPOWER on IntegriCloud