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] |
For an example on 32bit PPC: long long absl1(long long i) { long long t; if(i>=0) t = i; else t = -i; return t; } Without the patch: _absl1: cmpwi cr7,r3,0 mr r10,r4 mr r9,r3 blt- cr7,L7 mr r3,r9 mr r4,r10 blr L7: subfic r10,r4,0 subfze r9,r3 mr r3,r9 mr r4,r10 blr
With the patch: _absl1: srawi r9,r3,31 srawi r10,r3,31 xor r3,r9,r3 xor r4,r10,r4 subfc r4,r10,r4 subfe r3,r9,r3 blr
ChangeLog: *tree-ssa-phiopt.c (tree_ssa_phiopt): Split into conditional_replacement. Call also absolute_replacement. (conditional_replacement): New function. (absolute_replacement): New function.
Attachment:
temp.abs.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |