Commit 5316dd1b by Wilco Dijkstra Committed by Wilco Dijkstra

Add check_effective_target_autoincdec.

Add check_effective_target_autoincdec that returns true if a target
runs the auto_inc_dec optimization pass.

    gcc/
	* doc/sourcebuild.texi (autoincdec): Add autoincdec description.

    gcc/testsuite/
	PR middle-end/46932
	* gcc.dg/pr46932.c: Use dg-require-effective-target autoincdec.
	* lib/target-supports.exp: Add check_effective_target_autoincdec.

From-SVN: r251087
parent 250db3f9
2017-08-14 Wilco Dijkstra <wdijkstr@arm.com>
PR middle-end/46932
* doc/sourcebuild.texi (autoincdec): Add autoincdec description.
2017-08-14 Georg-Johann Lay <avr@gjlay.de>
PR target/81754
......
......@@ -1846,6 +1846,9 @@ PowerPC target supports executing VSX instructions (ISA 2.06).
@c Please keep this table sorted alphabetically.
@table @code
@item autoincdec
Target supports autoincrement/decrement addressing.
@item avx
Target supports compiling @code{avx} instructions.
......
2017-08-14 Wilco Dijkstra <wdijkstr@arm.com>
PR middle-end/46932
* gcc.dg/pr46932.c: Use dg-require-effective-target autoincdec.
* lib/target-supports.exp: Add check_effective_target_autoincdec.
2017-08-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
* gcc.target/aarch64/dbl_mov_immediate_1.c: Add
......
/* { dg-options "-O2 -fdump-rtl-auto_inc_dec" } */
/* Build on targets which have pre increment. */
/* { dg-do compile { target aarch64*-*-* arm*-*-* rs6000-*-* powerpc*-*-* arc*-*-* m32r-*-* tic6x-*-* } } */
/* { dg-require-effective-target autoincdec } */
/* Check that accesses based on the frame pointer do not
use auto increment. */
......
......@@ -8482,3 +8482,18 @@ proc check_effective_target_arm_coproc4_ok { } {
return [check_cached_effective_target arm_coproc4_ok \
check_effective_target_arm_coproc4_ok_nocache]
}
# Return 1 if the target supports the auto_inc_dec optimization pass.
proc check_effective_target_autoincdec { } {
if { ![check_no_compiler_messages auto_incdec assembly { void f () { }
} "-O2 -fdump-rtl-auto_inc_dec" ] } {
return 0
}
set dumpfile [glob -nocomplain "auto_incdec[pid].c.\[0-9\]\[0-9\]\[0-9\]r.auto_inc_dec"]
if { [file exists $dumpfile ] } {
file delete $dumpfile
return 1
}
return 0
}
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