https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115138

--- Comment #21 from Iain Buclaw <ibuclaw at gcc dot gnu.org> ---
Now doing a fair comparison:

Command:

g++-11 -std=c++11  \
   -fno-PIE -c -O3 -g -fno-checking -DIN_GCC -fno-exceptions \
  -fno-rtti -fasynchronous-unwind-tables \
  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format \
  -Wmissing-format-attribute -Wconditionally-supported \
  -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros \
  -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -fno-PIE \
  -I../stage1-gcc -I../../gcc -I../../gcc/. -I../../gcc/../include  \
  -I../../gcc/../libcpp/include -I../../gcc/../libcody  \
  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid \
  -I../libdecnumber -I../../gcc/../libbacktrace   \
  -o gimplify.o ../../gcc/gimplify.cc

Optimized-tree dump around line 6529.
```
  <bb 81> [local count: 302659225]:
  # _272 = PHI <is_gimple_reg_rhs_or_call(79), is_gimple_mem_rhs_or_call(80)>
  # DEBUG lhs => NULL
  # DEBUG final_pred => _272
  # DEBUG BEGIN_STMT
  if (_272 != _547)
    goto <bb 83>; [53.47%]
  else
    goto <bb 82>; [46.53%]

  <bb 82> [local count: 301785332]:
  # DEBUG BEGIN_STMT
  _66 = MEM[(union tree_node * *)_1 + 32B];
  _67 = _66->base.code;
  if (_67 == 163)
    goto <bb 84>; [34.00%]
  else
    goto <bb 93>; [66.00%]

  <bb 83> [local count: 161831887]:
  # DEBUG BEGIN_STMT
  ret_268 = gimplify_expr (_796, pre_p_252(D), post_p_253(D), _272, 1);
  # DEBUG ret => ret_268
  # DEBUG BEGIN_STMT
  if (ret_268 == -2)
    goto <bb 14>; [0.54%]
  else
    goto <bb 82>; [99.46%]
```


Command #2:

../stage1-gcc/xg++ -B../stage1-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ \
  -nostdinc++ -B../stage1-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs \
  -B../stage1-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  \
  -I../stage1-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu  \
  -I../stage1-x86_64-pc-linux-gnu/libstdc++-v3/include  \
  -I../../libstdc++-v3/libsupc++ \
  -L../stage1-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs \
  -L../stage1-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  \
  -fno-PIE -c -O3 -g -fno-checking -DIN_GCC  -fno-exceptions \
  -fno-rtti -fasynchronous-unwind-tables \
  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual \
  -Wmissing-format-attribute -Wconditionally-supported \
  -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros \
  -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -fno-PIE \
  -I../stage2-gcc -I../../gcc -I../../gcc/. -I../../gcc/../include  \
  -I../../gcc/../libcpp/include -I../../gcc/../libcody  \
  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid \
  -I../libdecnumber -I../../gcc/../libbacktrace   \
  -o gimplify.o ../../gcc/gimplify.cc


Output.
```
  <bb 83> [local count: 302659226]:
  # _274 = PHI <is_gimple_reg_rhs_or_call(82), is_gimple_mem_rhs_or_call(81)>
  # DEBUG lhs => NULL
  # DEBUG final_pred => _274
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_270 = gimplify_expr (_723, pre_p_253(D), post_p_254(D), _274, 1);
  # DEBUG ret => ret_270
  # DEBUG BEGIN_STMT
  if (ret_270 == -2)
    goto <bb 16>; [0.54%]
  else
    goto <bb 84>; [99.46%]

  <bb 84> [local count: 301785333]:
  # DEBUG BEGIN_STMT
  _66 = MEM[(union tree_node * *)_1 + 32B];
  _67 = _66->base.code;
  if (_67 == 163)
    goto <bb 85>; [34.00%]
  else
    goto <bb 90>; [66.00%]
```

Is this helpful enough to narrow it down?

Reply via email to