This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR target/44245: ICE: in extract_insn, at recog.c:2048
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: ubizjak at gmail dot com
- Date: Sat, 22 May 2010 14:51:39 -0700
- Subject: PATCH: PR target/44245: ICE: in extract_insn, at recog.c:2048
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
def_builtin doesn't check if a 64bit builtin needs ISAs. This checks
OPTION_MASK_ISA_64BIT properly. OK for trunk and 4.4/4.5?
Thanks.
H.J.
---
gcc/
2010-05-22 H.J. Lu <hongjiu.lu@intel.com>
PR target/44245
* config/i386/i386.c (def_builtin): Properly check
OPTION_MASK_ISA_64BIT.
gcc/testsuite/
2010-05-22 H.J. Lu <hongjiu.lu@intel.com>
PR target/44245
* gcc.target/i386/crc32-3.c: New.
* gcc.target/i386/crc32-4.c: Likewise.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index e4e758d..491cd53 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -21592,6 +21592,7 @@ def_builtin (int mask, const char *name, enum ix86_builtin_func_type tcode,
{
ix86_builtins_isa[(int) code].isa = mask;
+ mask &= ~OPTION_MASK_ISA_64BIT;
if (mask == 0
|| (mask & ix86_isa_flags) != 0
|| (lang_hooks.builtin_function
--- /dev/null 2010-05-14 16:54:27.578006588 -0700
+++ gcc/gcc/testsuite/gcc.target/i386/crc32-3.c 2010-05-22 14:40:05.586571582 -0700
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2 -mcrc32" } */
+/* { dg-final { scan-assembler "__builtin_ia32_crc32di" } } */
+
+unsigned long long
+crc32d (unsigned long long x, unsigned long long y)
+{
+ return __builtin_ia32_crc32di (x, y);
+}
--- /dev/null 2010-05-14 16:54:27.578006588 -0700
+++ gcc/gcc/testsuite/gcc.target/i386/crc32-4.c 2010-05-22 14:38:59.512497550 -0700
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mno-sse4.2 -mno-crc32" } */
+/* { dg-final { scan-assembler "__builtin_ia32_crc32di" } } */
+
+unsigned long long
+crc32d (unsigned long long x, unsigned long long y)
+{
+ return __builtin_ia32_crc32di (x, y);
+}