Author: yug
Date: 2012-04-27 03:39:48 -0400 (Fri, 27 Apr 2012)
New Revision: 3919

Modified:
   trunk/osprey/be/opt/opt_prop.cxx
Log:
fix for bug963.

try copy propogation into variables inside ASM_INPUT. if the copy 
source is a constant and the required constrait is "i".

Code Review: Lai Jian-Xin.


Modified: trunk/osprey/be/opt/opt_prop.cxx
===================================================================
--- trunk/osprey/be/opt/opt_prop.cxx    2012-04-27 07:37:16 UTC (rev 3918)
+++ trunk/osprey/be/opt/opt_prop.cxx    2012-04-27 07:39:48 UTC (rev 3919)
@@ -1511,6 +1511,14 @@
               CODEREP *possible_prop = Copy_propagate_cr(x->Opnd(i), curbb, 
inside_cse, in_array);
               if (possible_prop && possible_prop->Kind() == 
x->Opnd(i)->Kind()) 
                 expr = possible_prop;
+              // open64.net bug963. If the Asm_input constraint is "i", i.e, 
required immediate
+              // and the possible propagation is also a constant, we do this 
propagation on demand.
+              else if (possible_prop &&
+                       (possible_prop->Kind() == CK_CONST ||
+                        possible_prop->Kind() == CK_RCONST) &&
+                       
!strncmp(ST_name(&St_Table[x->Asm_constraint()]),"i",1)) {
+                expr = possible_prop;
+              }
               else {
                 x->Opnd(i)->Set_flag(CF_DONT_PROP);
                 expr = NULL;


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to