From ee29c75c650c5942bdbbb2d75806b97ff2b19e19 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. llvm-svn: 24650 --- 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> ]>; //===----------------------------------------------------------------------===//