3535import jdk .graal .compiler .core .common .type .PrimitiveStamp ;
3636import jdk .graal .compiler .core .common .type .Stamp ;
3737import jdk .graal .compiler .debug .Assertions ;
38+ import jdk .graal .compiler .debug .GraalError ;
3839import jdk .graal .compiler .graph .NodeClass ;
3940import jdk .graal .compiler .lir .gen .ArithmeticLIRGeneratorTool ;
4041import jdk .graal .compiler .nodeinfo .NodeInfo ;
@@ -67,14 +68,15 @@ public ZeroExtendNode(ValueNode input, int resultBits) {
6768 public ZeroExtendNode (ValueNode input , int inputBits , int resultBits , boolean inputAlwaysPositive ) {
6869 super (TYPE , BinaryArithmeticNode .getArithmeticOpTable (input ).getZeroExtend (), inputBits , resultBits , input );
6970 this .inputAlwaysPositive = inputAlwaysPositive ;
71+ GraalError .guarantee (!inputAlwaysPositive , "ZeroExtendNode.inputAlwaysPositive is deprecated." );
7072 }
7173
7274 public static ValueNode create (ValueNode input , int resultBits , NodeView view ) {
73- return create (input , PrimitiveStamp .getBits (input .stamp (view )), resultBits , view , inputAlwaysPositive ( input ) );
75+ return create (input , PrimitiveStamp .getBits (input .stamp (view )), resultBits , view , false );
7476 }
7577
7678 public static ValueNode create (ValueNode input , int inputBits , int resultBits , NodeView view ) {
77- return create (input , inputBits , resultBits , view , inputAlwaysPositive ( input ) );
79+ return create (input , inputBits , resultBits , view , false );
7880 }
7981
8082 public static ValueNode create (ValueNode input , int inputBits , int resultBits , NodeView view , boolean alwaysPositive ) {
@@ -86,15 +88,6 @@ public static ValueNode create(ValueNode input, int inputBits, int resultBits, N
8688 return canonical (null , input , inputBits , resultBits , view , alwaysPositive );
8789 }
8890
89- private static boolean inputAlwaysPositive (ValueNode v ) {
90- Stamp s = v .stamp (NodeView .DEFAULT );
91- if (s instanceof IntegerStamp ) {
92- return ((IntegerStamp ) s ).isPositive ();
93- } else {
94- return false ;
95- }
96- }
97-
9891 @ Override
9992 protected IntegerConvertOp <ZeroExtend > getOp (ArithmeticOpTable table ) {
10093 return table .getZeroExtend ();
0 commit comments