A long running feature request #1147147 is that we pack
subword quantities in objects. We don't currently so
we store boolean quantities using INT_STORE (see
OPT_IRTools.getStoreOp). This means the Intel BURS rule:
stm: BYTE_STORE(boolcmp, OTHER_OPERAND(r,riv))
never gets fired. This means we generate a store of a
boolcmp to memory as:
3) zero extend set result
4) move zero extended result to memory
This can be simplified down to:
2) mov zero to memory
3) set least significant byte in memory
Although fixing REF #1147147 would be better as that
2) set memory
Anyway, this patch at least makes option 2 a choice. As
ever, the BURS costs a guesses.
NB we zero extend rather than clearing the register as
the register allocator detects the clearing of the
register prior to setting as dead code. As this patch
concerns memory, the register allocator isn't a problem.
STATEMENT OF ORIGIN FOR A SINGLE CONTRIBUTOR
I, Ian Rogers:
(a) represent that either:
(i) I am the only author and owner of the contributed
(described as/entitled BURS rules for storing
booleans in INTs),
which was neither derived nor copied from any
(ii) that any exception to (i) is software which was
obtained under the
CPL (Common Public License),
(b) hereby agree to license this contributed software
under the CPL.
Log in to post a comment.