Hello All:
Gatekeepers could you please review the fix for bug ID 739 and 723.
Following files are modified
Osprey/wgen/wgen_expr.cxx
osprey/be/com/opt_cvtl_rule.cxx
osprey/be/opt/opt_emit_template.h
The changes are made not to emit CVT for types vectors is not needed and also
to keep CVT generated
By LNO. Changes also made to check for gs_decl_initial if VAR_DECL is found for
copy -1 preg to temp area.
Index: osprey/wgen/wgen_expr.cxx
===================================================================
--- osprey/wgen/wgen_expr.cxx (revision 3506)
+++ osprey/wgen/wgen_expr.cxx (working copy)
@@ -9836,7 +9836,11 @@
{
if (gs_tree_code(
gs_tree_operand(gs_tree_value (list),0)) == GS_VAR_DECL )
- is_gs_addr_arg = TRUE;
+ {
+ gs_t argument = gs_tree_operand(gs_tree_value (list),0);
+ if(gs_decl_initial(argument))
+ is_gs_addr_arg = TRUE;
+ }
}
}
}
Index: osprey/be/com/opt_cvtl_rule.cxx
===================================================================
--- osprey/be/com/opt_cvtl_rule.cxx (revision 3506)
+++ osprey/be/com/opt_cvtl_rule.cxx (working copy)
@@ -160,6 +160,12 @@
#endif
if (!(MTYPE_is_integral(from_ty) && MTYPE_is_integral(to_ty))) {
if (from_ty == to_ty) return NOT_AT_ALL;
+#ifdef TARG_X8664
+ if (MTYPE_is_vector(from_ty) && MTYPE_is_vector(to_ty) &&
+ MTYPE_is_mmx_vector(from_ty) == MTYPE_is_mmx_vector(to_ty)) {
+ return NOT_AT_ALL;
+ }
+#endif
if (opc != NULL)
*opc = OPCODE_make_op(OPR_CVT, to_ty, from_ty);
Index: osprey/be/opt/opt_emit_template.h
===================================================================
--- osprey/be/opt/opt_emit_template.h (revision 3506)
+++ osprey/be/opt/opt_emit_template.h (working copy)
@@ -106,9 +106,16 @@
if (WOPT_Enable_Cvt_Folding && !emitter->For_preopt()) {
INT cvt_kind;
OPCODE opc;
- cvt_kind =
- Need_type_conversion(exp->Dsctyp(), exp->Dtyp(), &opc);//326120
-
+ if (MTYPE_is_vector(exp->Dtyp()) && MTYPE_is_vector(exp->Dsctyp())
+ && exp->Dtyp() != exp->Dsctyp()) {
+ opc = OPCODE_make_op(OPR_CVT, exp->Dtyp(), exp->Dsctyp());
+ cvt_kind = NEED_CVT;
+ }
+ else
+ {
+ cvt_kind =
+ Need_type_conversion(exp->Dsctyp(), exp->Dtyp(), &opc);//326120
+ }
CODEREP *kid = exp->Get_opnd(0);
if (cvt_kind == NEED_CVT) {
Thanks & Regards
Ajit
AMD open source compiler Team Bangalore.
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel