This is the mail archive of the gcc-patches@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] |
Hello! Attached patch enables post-reload compare elimination pass by providing expected patterns (duplicates of existing patterns with setters of reg and flags switched in the parallel) for flag setting arithmetic instructions. The merge triggers more than 3000 times during the gcc bootstrap, mostly in cases where intervening memory load or store prevents combine from merging the arithmetic insn and the following compare. Also, some recent linux x86_64 defconfig build results in ~200 merges, removing ~200 test/cmp insns. Not much, but I think the results still warrant the pass to be enabled. 2017-05-09 Uros Bizjak <ubizjak@gmail.com> * config/i386/i386-protos.h (ix86_match_ccmode_last): New prototype. * config/i386/i386.c (ix86_match_ccmode_1): Rename from ix86_match_ccmode. Add "last" argument. Make function static inline. (ix86_match_ccmode): New function. (ix86_match_ccmode_last): Ditto. (TARGET_FLAGS_REGNUM): Define. * config/i386/i386.md (*add<mode>_2b): New insn pattern. (*sub<mode>_2b): Ditto. (*and<mode>_2b): Ditto. (*<any_or:code><mode>_2b): Ditto. Patch was bootstrapped and regression tested on x86_64-linux-gnu. Uros.
Attachment:
p.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |