summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/bmi-4.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-18 10:33:36 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-18 10:33:36 +0000
commit0f15bf2ebe4b001a06ab7869f0c7bcbb74b5469e (patch)
tree7393ac7f037f04ea997b60a08f0eba639c9798d6 /gcc/testsuite/gcc.target/i386/bmi-4.c
parent80135bd9bbf06da9d0214ece3c59c301d3af3a2b (diff)
downloadgcc-0f15bf2ebe4b001a06ab7869f0c7bcbb74b5469e.tar.gz
2010-11-18 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 166897 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@166899 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/bmi-4.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-4.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/bmi-4.c b/gcc/testsuite/gcc.target/i386/bmi-4.c
new file mode 100644
index 00000000000..e0a11616232
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/bmi-4.c
@@ -0,0 +1,13 @@
+/* { dg-do link } */
+/* { dg-options "-O2 -mbmi" } */
+
+#include <x86intrin.h>
+
+/* Test that a constant operand 0 to tzcnt gets folded. */
+extern void link_error(void);
+int main()
+{
+ if (__tzcnt_u32(0) != 32)
+ link_error();
+ return 0;
+}