* gcc.target/cris/builtin_clz_v3.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128033
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-09-03 Jesper Nilsson <jesper.nilsson@axis.com>
+
+ * gcc.target/cris/builtin_clz_v0.c: New testcase.
+ * gcc.target/cris/builtin_clz_v3.c: New testcase.
+
2007-09-02 Tobias Schlüuter <tobi@gcc.gnu.org>
* gfortran.dg/substr_6.f90: New test.
--- /dev/null
+/* Check that we don't use the lz insn for clz by checking assembler output.
+ The lz insn was implemented in CRIS v3 (ETRAX 4). */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "cris-*-elf" } { "-march*" } { "" } } */
+/* { dg-options "-O2 -march=v0" } */
+/* { dg-final { scan-assembler-not "\[ \t\]lz\[ \t\]" } } */
+
+int
+f (int a)
+{
+ return __builtin_clz(a);
+}
--- /dev/null
+/* Check that we use the lz insn for clz by checking assembler output.
+ The lz insn was implemented in CRIS v3 (ETRAX 4). */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "cris-*-elf" } { "-march*" } { "" } } */
+/* { dg-options "-O2 -march=v8" } */
+/* { dg-final { scan-assembler "\[ \t\]lz\[ \t\]" } } */
+
+int
+f (int a)
+{
+ return __builtin_clz(a);
+}