From 90c7593a752f5a2db1aad8278896384e7599d33f Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Tue, 3 Oct 2017 00:06:41 +0000 Subject: 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 --- llvm/lib/Target/AMDGPU/VOP3Instructions.td | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Target/AMDGPU/VOP3Instructions.td') 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 { -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 { ret1)); } -class IntClampPat : Pat< +class IntClampPat : GCNPat< getClampPat.ret, getClampRes.ret >; -- cgit v1.2.3