Commit e2939e75 by Richard Henderson Committed by Richard Henderson

builtins.c (expand_builtin_sync_operation): Fold nand to and for constants.

        * builtins.c (expand_builtin_sync_operation): Fold nand to and
        for constants.

From-SVN: r98324
parent a45f6936
2005-04-18 Richard Henderson <rth@redhat.com>
* builtins.c (expand_builtin_sync_operation): Fold nand to and
for constants.
2005-04-18 Devang Patel <dpatel@apple.com> 2005-04-18 Devang Patel <dpatel@apple.com>
* config/rs6000/atlivec.md (mulv4si3): New pattern. * config/rs6000/atlivec.md (mulv4si3): New pattern.
......
...@@ -5255,13 +5255,20 @@ expand_builtin_sync_operation (tree arglist, enum rtx_code code, bool after, ...@@ -5255,13 +5255,20 @@ expand_builtin_sync_operation (tree arglist, enum rtx_code code, bool after,
{ {
enum machine_mode mode; enum machine_mode mode;
rtx addr, val, mem; rtx addr, val, mem;
tree valt;
/* Expand the operands. */ /* Expand the operands. */
addr = expand_expr (TREE_VALUE (arglist), NULL, Pmode, EXPAND_SUM); addr = expand_expr (TREE_VALUE (arglist), NULL, Pmode, EXPAND_SUM);
mode = TYPE_MODE (TREE_TYPE (TREE_TYPE (TREE_VALUE (arglist)))); mode = TYPE_MODE (TREE_TYPE (TREE_TYPE (TREE_VALUE (arglist))));
arglist = TREE_CHAIN (arglist); arglist = TREE_CHAIN (arglist);
val = expand_expr (TREE_VALUE (arglist), NULL, mode, EXPAND_NORMAL); valt = TREE_VALUE (arglist);
if (code == NOT && TREE_CONSTANT (valt))
{
valt = fold_build1 (BIT_NOT_EXPR, TREE_TYPE (valt), valt);
code = AND;
}
val = expand_expr (valt, NULL, mode, EXPAND_NORMAL);
/* Note that we explicitly do not want any alias information for this /* Note that we explicitly do not want any alias information for this
memory, so that we kill all other live memories. Otherwise we don't memory, so that we kill all other live memories. Otherwise we don't
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment