From d8fe3b32723fe9d7a31e7b2ab5ac2fd95fe7193e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 9 Dec 2005 22:58:42 +0000 Subject: [PATCH] Add SDTCisPtrTy and use it for loads, to indicate that the operand of a load must be a pointer. This removes a type check out of the code generated by tblgen for load matching. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24650 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/TargetSelectionDAG.td | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Target/TargetSelectionDAG.td b/lib/Target/TargetSelectionDAG.td index 996777f1ed8..e0585b756e2 100644 --- a/lib/Target/TargetSelectionDAG.td +++ b/lib/Target/TargetSelectionDAG.td @@ -24,15 +24,17 @@ class SDTypeConstraint { } // SDTCisVT - The specified operand has exactly this VT. -class SDTCisVT : SDTypeConstraint { +class SDTCisVT : SDTypeConstraint { ValueType VT = vt; } +class SDTCisPtrTy : SDTypeConstraint; + // SDTCisInt - The specified operand is has integer type. class SDTCisInt : SDTypeConstraint; // SDTCisFP - The specified operand is has floating point type. -class SDTCisFP : SDTypeConstraint; +class SDTCisFP : SDTypeConstraint; // SDTCisSameAs - The two specified operands have identical types. class SDTCisSameAs : SDTypeConstraint { @@ -132,7 +134,7 @@ def SDTWritePort : SDTypeProfile<0, 2, [ // writeport ]>; def SDTLoad : SDTypeProfile<1, 1, [ // load - SDTCisInt<1> + SDTCisPtrTy<1> ]>; //===----------------------------------------------------------------------===//