Request for review (L): 6797305: Add LoadUB and LoadUI opcode class
Tom Rodriguez
Thomas.Rodriguez at Sun.COM
Fri Mar 6 13:34:58 PST 2009
>> Didn't you reorder the instruct definitions?
>
> No, I just uncommented some of them. Maybe these have been commented
> because of this bug...
It's possible. The ConvI2L LoadI variant was the first and only one
before your change but now it's not.
>
>
>> I think the cisc spill
>> matching selects the first one it sees and it's possible that now
>> it's
>> finding the LoadB variant. Anyway, I think cisc_spill_match should
>> be
>> fixed to handle this correctly.
>
> Do you think I can fix that or is it too complicated for a "beginner"?
> At least I will have a look at it.
You want this change:
@@ -3431,10 +3431,16 @@ int MatchNode::cisc_spill_match(FormDict
const InstructForm *form2_inst = form2 ? form2-
>is_instruction() : NULL;
const char *name_left = mRule2->_lChild ? mRule2->_lChild-
>_opType : NULL;
const char *name_right = mRule2->_rChild ? mRule2->_rChild-
>_opType : NULL;
+ DataType data_type = Form::none;
+ if (form->is_operand()) {
+ // Make sure the loadX matches the type of the reg
+ data_type = form->ideal_to_Reg_type(form->is_operand()-
>ideal_type(globals));
+ }
// Detect reg vs (loadX memory)
if( form->is_cisc_reg(globals)
&& form2_inst
- && (is_load_from_memory(mRule2->_opType) != Form::none) //
reg vs. (load memory)
+ && data_type != Form::none
+ && (is_load_from_memory(mRule2->_opType) == data_type) // reg
vs. (load memory)
&& (name_left != NULL) // NOT (load)
&& (name_right == NULL) ) { // NOT (load memory foo)
const Form *form2_left = name_left ? globals[name_left] : NULL;
This will verify that the ideal type of the register and the load
operation are in agreement.
tom
>
>
> -- Christian
>
More information about the hotspot-compiler-dev
mailing list