Skip to content

Commit 89ade1d

Browse files
committedNov 1, 2021
8273416: C2: assert(false) failed: bad AD file after JDK-8252372 with UseSSE={0,1}
Reviewed-by: kvn, roland
1 parent dbf5100 commit 89ade1d

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed
 

‎src/hotspot/cpu/x86/x86_32.ad

+20
Original file line numberDiff line numberDiff line change
@@ -7203,6 +7203,7 @@ instruct castLL( eRegL dst ) %{
72037203
%}
72047204

72057205
instruct castFF( regF dst ) %{
7206+
predicate(UseSSE >= 2);
72067207
match(Set dst (CastFF dst));
72077208
format %{ "#castFF of $dst" %}
72087209
ins_encode( /*empty encoding*/ );
@@ -7211,6 +7212,25 @@ instruct castFF( regF dst ) %{
72117212
%}
72127213

72137214
instruct castDD( regD dst ) %{
7215+
predicate(UseSSE >= 2);
7216+
match(Set dst (CastDD dst));
7217+
format %{ "#castDD of $dst" %}
7218+
ins_encode( /*empty encoding*/ );
7219+
ins_cost(0);
7220+
ins_pipe( empty );
7221+
%}
7222+
7223+
instruct castFF_PR( regFPR dst ) %{
7224+
predicate(UseSSE < 2);
7225+
match(Set dst (CastFF dst));
7226+
format %{ "#castFF of $dst" %}
7227+
ins_encode( /*empty encoding*/ );
7228+
ins_cost(0);
7229+
ins_pipe( empty );
7230+
%}
7231+
7232+
instruct castDD_PR( regDPR dst ) %{
7233+
predicate(UseSSE < 2);
72147234
match(Set dst (CastDD dst));
72157235
format %{ "#castDD of $dst" %}
72167236
ins_encode( /*empty encoding*/ );

‎src/hotspot/share/opto/castnode.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class CastFFNode: public ConstraintCastNode {
140140
init_class_id(Class_CastFF);
141141
}
142142
virtual int Opcode() const;
143-
virtual uint ideal_reg() const { return Op_RegF; }
143+
virtual uint ideal_reg() const { return in(1)->ideal_reg(); }
144144
};
145145

146146
class CastDDNode: public ConstraintCastNode {
@@ -150,7 +150,7 @@ class CastDDNode: public ConstraintCastNode {
150150
init_class_id(Class_CastDD);
151151
}
152152
virtual int Opcode() const;
153-
virtual uint ideal_reg() const { return Op_RegD; }
153+
virtual uint ideal_reg() const { return in(1)->ideal_reg(); }
154154
};
155155

156156
class CastVVNode: public ConstraintCastNode {

0 commit comments

Comments
 (0)
Please sign in to comment.