This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/14341] Missed comparison optimization (VRP)


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-07 19:30 -------
Huh, I don't understand why VRP does not take care of this:
i_13: [-2147483648, 99999999]
  D.1236_4 = i_13 <= 99999999;


  i_13 = ASSERT_EXPR <i_1, i_1 <= 99999999>;
  D.1236_4 = i_13 <= 99999999;


The following is the testcase which I used with -O2 -fno-tree-dominator-opts, otherwise VRP is not 
run:
void f(int);
int h(int, int);
void t(int *ttt)
{
  int i;
  int x;
  *ttt  = 1;
if (ttt== 0)
  f(0);
    for( i = 0; i < 100000000; i++ ){
        f(i < 100000000);
    }

}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dnovillo at gcc dot gnu dot
                   |                            |org
            Summary|Missed comparison           |Missed comparison
                   |optimization (jump threading|optimization (VRP)
                   |related)                    |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14341


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]