This a new version of the patch posted in https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00226.html. I have done more testing and spitted the patch to make it more easier to review. There are still couple of issues to be addressed and I am working on them.
1. AARCH64 bootstrap now fails with the commit 94f92c36a83d66a893c3bc6f00a038ba3dbe2a6f. simplify-rtx.c is mis-compiled in stage2 and fwprop.c is failing. It looks to me that there is a latent issue which gets exposed my patch. I can also reproduce this in x86_64 if I use the same PROMOTE_MODE which is used in aarch64 port. For the time being, I am using patch 0006-temporary-workaround-for-bootstrap-failure-due-to-co.patch as a workaround. This meeds to be fixed before the patches are ready to be committed. 2. vector-compare-1.c from c-c++-common/torture fails to assemble with -O3 -g Error: unaligned opcodes detected in executable segment. It works fine if I remove the -g. I am looking into it and needs to be fixed as well. In the meantime, I would appreciate if you take some time to review this. I have bootstrapped on x86_64-linux-gnu, arm-linux-gnu and aarch-64-linux-gnu (with the workaround) and regression tested. Thanks, Kugan