I doubt Open64 has the same bug.
Thanks.
---------- Forwarded message ----------
From: Hucheng Zhou <zhou.huch...@gmail.com>
Date: Tue, Oct 19, 2010 at 10:45 AM
Subject: A found bug and the fix
To: path64-...@lists.pathscale.com
Hi:
During the feedback optimization, I found a bug in WN_lower.cxx:
The symptom is that assertion in Bottom_up_cr() in opt_etable.cxx:
Is_True(cr->Opr() != OPR_ARRAY,
("ETABLE::Bottom_up_cr: reach an OPR_ARRAY node,"
"this is a bug in lowering process"));
The root cause is that OPR_ARRAY hasn't been lowered even the lower
actions in WOPT has include LOWER_ARRAY. Last, the root case is that when
feedback info is available, then simp_remdiv() will do multi-version for
OPR_DIV, OPR_REM, OPR_MOD. However, this wont lower it's kid, even the kid
includes ARRAY operator. For example:
I4I4LDID 20 <1,422,TIMSIM> T<4,.predef_I4,4>
U8U8LDID 0 <1,393,PLATQ> T<106,anon_ptr.,8>
I8I8LDID 56 <1,393,PLATQ> T<5,.predef_I8,8>
I8I4LDID 0 <2,3,N> T<4,.predef_I4,4>
I8I8LDID 48 <1,393,PLATQ> T<5,.predef_I8,8>
I8SUB
U8ARRAY 1 400
I4I4ILOAD 360 T<4,.predef_I4,4> T<134,anon_ptr.,8>
I4REM
So the fix is straightforward, before simp_remdiv, first lower its kid.
Please review it.
diff --git a/src/be/com/wn_lower.cxx b/src/be/com/wn_lower.cxx
index 37a450d..f3f7e62 100644
--- a/src/be/com/wn_lower.cxx
+++ b/src/be/com/wn_lower.cxx
@@ -8537,6 +8539,9 @@ static WN *lower_expr(WN *block, WN *tree,
LOWER_ACTIONS actions)
{
#ifdef KEY
+ // If tree includes ARRAY, first lower it
+ for (INT j = 0; j < WN_kid_count(tree); j++)
+ WN_kid(tree,j) = lower_expr(block, WN_kid(tree,j), actions);
WN* simp = simp_remdiv( block, tree, actions );
if( simp != NULL ){
return simp;
Thanks.
--
Institute of High Performance Computing,
Department of Computer Science and Technology,
Tsinghua University, Beijing, China, 100084.
--
Institute of High Performance Computing,
Department of Computer Science and Technology,
Tsinghua University, Beijing, China, 100084.
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel