Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
be1637fa
Commit
be1637fa
authored
Oct 12, 2016
by
Christoph Mallon
Browse files
amd64: Avoid redundant sign/zero extension right before a store.
parent
94df3d3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
NEWS.md
View file @
be1637fa
...
...
@@ -39,7 +39,7 @@ libFirm 1.22.1 (2016-01-07)
*
opt: Simplify computed goto with known destination to unconditional branch
*
opt: Handle constant folding for the builtins
`clz`
,
`ctz`
,
`ffs`
,
`parity`
and
`popcount`
*
arm: Avoid redundant sign/zero extension right after a load
*
arm: Avoid redundant sign/zero extension right before a store
*
amd64,
arm: Avoid redundant sign/zero extension right before a store
*
Bugfixes
libFirm 1.22.0 (2015-12-31)
...
...
ir/be/amd64/amd64_transform.c
View file @
be1637fa
...
...
@@ -2527,7 +2527,7 @@ static ir_node *gen_Store(ir_node *const node)
{
dbg_info
*
const
dbgi
=
get_irn_dbg_info
(
node
);
ir_node
*
const
block
=
be_transform_nodes_block
(
node
);
ir_node
*
const
val
=
get_Store_value
(
node
);
ir_node
*
val
=
get_Store_value
(
node
);
ir_mode
*
const
mode
=
get_irn_mode
(
val
);
amd64_binop_addr_attr_t
attr
;
...
...
@@ -2537,10 +2537,13 @@ static ir_node *gen_Store(ir_node *const node)
ir_node
*
in
[
4
];
int
arity
=
0
;
if
(
mode_needs_gp_reg
(
mode
)
&&
match_immediate_32
(
&
attr
.
u
.
immediate
,
val
,
false
))
{
if
(
!
mode_needs_gp_reg
(
mode
))
{
goto
store_reg
;
}
else
if
(
match_immediate_32
(
&
attr
.
u
.
immediate
,
val
,
false
))
{
attr
.
base
.
base
.
op_mode
=
AMD64_OP_ADDR_IMM
;
}
else
{
val
=
be_skip_downconv
(
val
,
false
);
store_reg:
attr
.
base
.
base
.
op_mode
=
AMD64_OP_ADDR_REG
;
int
reg_input
=
arity
++
;
in
[
reg_input
]
=
be_transform_node
(
val
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment