7199654: Remove LoadUI2LNode
Summary: Removed LoadUI2L node from Ideal nodes, use match rule in .ad files instead.
Reviewed-by: kvn
--- a/hotspot/src/cpu/sparc/vm/sparc.ad Tue Oct 09 10:11:38 2012 +0200
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad Tue Oct 09 12:40:05 2012 -0700
@@ -5885,8 +5885,8 @@
%}
// Load Unsigned Integer into a Long Register
-instruct loadUI2L(iRegL dst, memory mem) %{
- match(Set dst (LoadUI2L mem));
+instruct loadUI2L(iRegL dst, memory mem, immL_32bits mask) %{
+ match(Set dst (AndL (ConvI2L (LoadI mem)) mask));
ins_cost(MEMORY_REF_COST);
size(4);
--- a/hotspot/src/cpu/x86/vm/x86_32.ad Tue Oct 09 10:11:38 2012 +0200
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad Tue Oct 09 12:40:05 2012 -0700
@@ -1558,9 +1558,6 @@
// Returns true if the high 32 bits of the value is known to be zero.
bool is_operand_hi32_zero(Node* n) {
int opc = n->Opcode();
- if (opc == Op_LoadUI2L) {
- return true;
- }
if (opc == Op_AndL) {
Node* o2 = n->in(2);
if (o2->is_Con() && (o2->get_long() & 0xFFFFFFFF00000000LL) == 0LL) {
@@ -6152,8 +6149,8 @@
%}
// Load Unsigned Integer into Long Register
-instruct loadUI2L(eRegL dst, memory mem, eFlagsReg cr) %{
- match(Set dst (LoadUI2L mem));
+instruct loadUI2L(eRegL dst, memory mem, immL_32bits mask, eFlagsReg cr) %{
+ match(Set dst (AndL (ConvI2L (LoadI mem)) mask));
effect(KILL cr);
ins_cost(250);
--- a/hotspot/src/cpu/x86/vm/x86_64.ad Tue Oct 09 10:11:38 2012 +0200
+++ b/hotspot/src/cpu/x86/vm/x86_64.ad Tue Oct 09 12:40:05 2012 -0700
@@ -5200,9 +5200,9 @@
%}
// Load Unsigned Integer into Long Register
-instruct loadUI2L(rRegL dst, memory mem)
-%{
- match(Set dst (LoadUI2L mem));
+instruct loadUI2L(rRegL dst, memory mem, immL_32bits mask)
+%{
+ match(Set dst (AndL (ConvI2L (LoadI mem)) mask));
ins_cost(125);
format %{ "movl $dst, $mem\t# uint -> long" %}
--- a/hotspot/src/share/vm/adlc/forms.cpp Tue Oct 09 10:11:38 2012 +0200
+++ b/hotspot/src/share/vm/adlc/forms.cpp Tue Oct 09 12:40:05 2012 -0700
@@ -256,7 +256,6 @@
if( strcmp(opType,"LoadD_unaligned")==0 ) return Form::idealD;
if( strcmp(opType,"LoadF")==0 ) return Form::idealF;
if( strcmp(opType,"LoadI")==0 ) return Form::idealI;
- if( strcmp(opType,"LoadUI2L")==0 ) return Form::idealI;
if( strcmp(opType,"LoadKlass")==0 ) return Form::idealP;
if( strcmp(opType,"LoadNKlass")==0 ) return Form::idealNKlass;
if( strcmp(opType,"LoadL")==0 ) return Form::idealL;
--- a/hotspot/src/share/vm/adlc/formssel.cpp Tue Oct 09 10:11:38 2012 +0200
+++ b/hotspot/src/share/vm/adlc/formssel.cpp Tue Oct 09 12:40:05 2012 -0700
@@ -3395,7 +3395,7 @@
static const char *needs_ideal_memory_list[] = {
"StoreI","StoreL","StoreP","StoreN","StoreNKlass","StoreD","StoreF" ,
"StoreB","StoreC","Store" ,"StoreFP",
- "LoadI", "LoadUI2L", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF" ,
+ "LoadI", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF" ,
"LoadB" , "LoadUB", "LoadUS" ,"LoadS" ,"Load" ,
"StoreVector", "LoadVector",
"LoadRange", "LoadKlass", "LoadNKlass", "LoadL_unaligned", "LoadD_unaligned",
--- a/hotspot/src/share/vm/opto/classes.hpp Tue Oct 09 10:11:38 2012 +0200
+++ b/hotspot/src/share/vm/opto/classes.hpp Tue Oct 09 12:40:05 2012 -0700
@@ -150,7 +150,6 @@
macro(LoadD_unaligned)
macro(LoadF)
macro(LoadI)
-macro(LoadUI2L)
macro(LoadKlass)
macro(LoadNKlass)
macro(LoadL)
--- a/hotspot/src/share/vm/opto/compile.cpp Tue Oct 09 10:11:38 2012 +0200
+++ b/hotspot/src/share/vm/opto/compile.cpp Tue Oct 09 12:40:05 2012 -0700
@@ -2293,7 +2293,6 @@
case Op_LoadUB:
case Op_LoadUS:
case Op_LoadI:
- case Op_LoadUI2L:
case Op_LoadKlass:
case Op_LoadNKlass:
case Op_LoadL:
--- a/hotspot/src/share/vm/opto/memnode.hpp Tue Oct 09 10:11:38 2012 +0200
+++ b/hotspot/src/share/vm/opto/memnode.hpp Tue Oct 09 12:40:05 2012 -0700
@@ -274,18 +274,6 @@
virtual BasicType memory_type() const { return T_INT; }
};
-//------------------------------LoadUI2LNode-----------------------------------
-// Load an unsigned integer into long from memory
-class LoadUI2LNode : public LoadNode {
-public:
- LoadUI2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeLong* t = TypeLong::UINT)
- : LoadNode(c, mem, adr, at, t) {}
- virtual int Opcode() const;
- virtual uint ideal_reg() const { return Op_RegL; }
- virtual int store_Opcode() const { return Op_StoreL; }
- virtual BasicType memory_type() const { return T_LONG; }
-};
-
//------------------------------LoadRangeNode----------------------------------
// Load an array length from the array
class LoadRangeNode : public LoadINode {
--- a/hotspot/src/share/vm/opto/mulnode.cpp Tue Oct 09 10:11:38 2012 +0200
+++ b/hotspot/src/share/vm/opto/mulnode.cpp Tue Oct 09 12:40:05 2012 -0700
@@ -599,20 +599,6 @@
Node* in1 = in(1);
uint op = in1->Opcode();
- // Masking sign bits off of an integer? Do an unsigned integer to
- // long load.
- // NOTE: This check must be *before* we try to convert the AndLNode
- // to an AndINode and commute it with ConvI2LNode because
- // 0xFFFFFFFFL masks the whole integer and we get a sign extension,
- // which is wrong.
- if (op == Op_ConvI2L && in1->in(1)->Opcode() == Op_LoadI && mask == CONST64(0x00000000FFFFFFFF)) {
- Node* load = in1->in(1);
- return new (phase->C) LoadUI2LNode(load->in(MemNode::Control),
- load->in(MemNode::Memory),
- load->in(MemNode::Address),
- load->adr_type());
- }
-
// Are we masking a long that was converted from an int with a mask
// that fits in 32-bits? Commute them and use an AndINode. Don't
// convert masks which would cause a sign extension of the integer
--- a/hotspot/src/share/vm/opto/superword.cpp Tue Oct 09 10:11:38 2012 +0200
+++ b/hotspot/src/share/vm/opto/superword.cpp Tue Oct 09 12:40:05 2012 -0700
@@ -179,7 +179,6 @@
for (int i = 0; i < _block.length(); i++) {
Node* n = _block.at(i);
if (n->is_Mem() && !n->is_LoadStore() && in_bb(n) &&
- n->Opcode() != Op_LoadUI2L &&
is_java_primitive(n->as_Mem()->memory_type())) {
int align = memory_alignment(n->as_Mem(), 0);
if (align != bottom_align) {