2013/3/7 Chung-Ju Wu <jasonw...@gmail.com>: > 2013/3/5 Eric Botcazou <ebotca...@adacore.com>: >>> In other words, any 32-bit target with 'need_64bit_hwint=yes' in config.gcc >>> is not able to have benefit from this optimization because it never >>> passes the condition test. >>> >>> >>> My solution is to use GET_MODE_MASK(mode) to filter out all bits not >>> in target mode. The following is my patch: >> >> The patch is OK for 4.9 once stage #1 is open if it passes bootstrap/regtest. > > Thanks for the approval. I will wait for 4.9 stage1 opening. > The following is the new patch according to your suggestions: >
Hi, Eric, Since now it is on 4.9 stage1, I would like to contribute this patch. The followings are previous discussion: http://gcc.gnu.org/ml/gcc-patches/2013-02/msg01247.html http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00169.html http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00280.html The attached patch has passed bootstrap/regression test on x86_64-unknown-linux-gnu with current main trunk. A plaintext gcc/ChangeLog is as below: 2013-04-06 Chung-Ju Wu <jasonw...@gmail.com> * combine.c (simplify_compare_const): Use GET_MODE_MASK to filter out unnecessary bits in the constant power of two case. On behalf of Andes Technology Co., we have signed FSF agreement. However, so far I don't have svn write access yet. Would you please help to commit this patch? Thanks again for the approval and I really appreciate your help. :) Best regards, jasonwucj
gcc490-combine.svn.patch
Description: Binary data