Commit 6cfccbb2 by Kyrylo Tkachov Committed by Kyrylo Tkachov

[AArch64] Set TREE_TARGET_GLOBALS in aarch64_set_current_function when new tree…

[AArch64] Set TREE_TARGET_GLOBALS in aarch64_set_current_function when new tree is the default node to recalculate optab availability

	PR target/69245
	* config/aarch64/aarch64.c (aarch64_set_current_function):
	Save/restore target globals when switching to
	target_option_default_node.

	* gcc.target/aarch64/pr69245_1.c: New test.

From-SVN: r233745
parent ac59ad4e
2016-02-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/69245
* config/aarch64/aarch64.c (aarch64_set_current_function):
Save/restore target globals when switching to
target_option_default_node.
2016-02-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/69613
* config/aarch64/aarch64.c (aarch64_shift_truncation_mask):
Return 0 if !SHIFT_COUNT_TRUNCATED.
......
......@@ -8576,7 +8576,7 @@ aarch64_set_current_function (tree fndecl)
if (old_tree == new_tree)
;
else if (new_tree && new_tree != target_option_default_node)
else if (new_tree)
{
cl_target_option_restore (&global_options,
TREE_TARGET_OPTION (new_tree));
......
2016-02-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/69245
* gcc.target/aarch64/pr69245_1.c: New test.
2016-02-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/69613
* gcc.dg/torture/pr69613.c: New test.
......
/* { dg-do compile } */
/* { dg-options "-O2 -march=armv8-a+fp -fomit-frame-pointer" } */
#pragma GCC target "arch=armv8-a+nofp"
long a;
static void
fn1 ()
{
}
#pragma GCC target "arch=armv8-a+fp"
float
fn2 (float a)
{
return a + 2.0;
}
/* { dg-final { scan-assembler-not "__addsf3" } } */
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