summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/VOP3Instructions.td
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2017-10-03 00:06:41 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2017-10-03 00:06:41 +0000
commit90c7593a752f5a2db1aad8278896384e7599d33f (patch)
treeaae89f2007887191e4ab17c1f560d38eb66dd296 /llvm/lib/Target/AMDGPU/VOP3Instructions.td
parent25f6c196d7035be8cb818be95856c44c2356d3b9 (diff)
downloadbcm5719-llvm-90c7593a752f5a2db1aad8278896384e7599d33f.tar.gz
bcm5719-llvm-90c7593a752f5a2db1aad8278896384e7599d33f.zip
AMDGPU: Remove global isGCN predicates
These are problematic because they apply to everything, and can easily clobber whatever more specific predicate you are trying to add to a function. Currently instructions use SubtargetPredicate/PredicateControl to apply this to patterns applied to an instruction definition, but not to free standing Pats. Add a wrapper around Pat so the special PredicateControls requirements can be appended to the final predicate list like how Mips does it. llvm-svn: 314742
Diffstat (limited to 'llvm/lib/Target/AMDGPU/VOP3Instructions.td')
-rw-r--r--llvm/lib/Target/AMDGPU/VOP3Instructions.td8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/AMDGPU/VOP3Instructions.td b/llvm/lib/Target/AMDGPU/VOP3Instructions.td
index 736c6a5c449..aa041aab51c 100644
--- a/llvm/lib/Target/AMDGPU/VOP3Instructions.td
+++ b/llvm/lib/Target/AMDGPU/VOP3Instructions.td
@@ -450,17 +450,17 @@ let Predicates = [Has16BitInsts] in {
multiclass Ternary_i16_Pats <SDPatternOperator op1, SDPatternOperator op2,
Instruction inst, SDPatternOperator op3> {
-def : Pat<
+def : GCNPat <
(op2 (op1 i16:$src0, i16:$src1), i16:$src2),
(inst i16:$src0, i16:$src1, i16:$src2, (i1 0))
>;
-def : Pat<
+def : GCNPat<
(i32 (op3 (op2 (op1 i16:$src0, i16:$src1), i16:$src2))),
(inst i16:$src0, i16:$src1, i16:$src2, (i1 0))
>;
-def : Pat<
+def : GCNPat<
(i64 (op3 (op2 (op1 i16:$src0, i16:$src1), i16:$src2))),
(REG_SEQUENCE VReg_64,
(inst i16:$src0, i16:$src1, i16:$src2, (i1 0)), sub0,
@@ -528,7 +528,7 @@ class getClampRes<VOPProfile P, Instruction inst> {
ret1));
}
-class IntClampPat<VOP3Inst inst, SDPatternOperator node> : Pat<
+class IntClampPat<VOP3Inst inst, SDPatternOperator node> : GCNPat<
getClampPat<inst.Pfl, node>.ret,
getClampRes<inst.Pfl, inst>.ret
>;
OpenPOWER on IntegriCloud