aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorliuhongt <hongtao.liu@intel.com>2021-01-27 13:22:36 +0800
committerliuhongt <hongtao.liu@intel.com>2021-01-27 18:49:25 +0800
commit530b1d688761db46b33d26864d3a0684cc82e0f9 (patch)
treed0d2e1e249b32794afc43a4a229e90d849f3e850 /gcc
parent6cf43433750bbd2837c526e03283f126a6d2c6e6 (diff)
downloadgcc-530b1d688761db46b33d26864d3a0684cc82e0f9.zip
gcc-530b1d688761db46b33d26864d3a0684cc82e0f9.tar.gz
gcc-530b1d688761db46b33d26864d3a0684cc82e0f9.tar.bz2
Fix ICE for [PR target/98833].
And replace __builtin_ia32_pcmpeqb128 with operator == in libcpp. gcc/ChangeLog: PR target/98833 * config/i386/sse.md (sse2_gt<mode>3): Drop !TARGET_XOP in condition. (*sse2_eq<mode>3): Ditto. gcc/testsuite/ChangeLog: PR target/98833 * gcc.target/i386/pr98833.c: New test. libcpp/ PR target/98833 * lex.c (search_line_sse2): Replace builtins with == operator.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/sse.md4
-rw-r--r--gcc/testsuite/gcc.target/i386/pr98833.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 9683a99..369a00d 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -13041,7 +13041,7 @@
(eq:VI124_128
(match_operand:VI124_128 1 "vector_operand" "%0,x")
(match_operand:VI124_128 2 "vector_operand" "xBm,xm")))]
- "TARGET_SSE2 && !TARGET_XOP
+ "TARGET_SSE2
&& !(MEM_P (operands[1]) && MEM_P (operands[2]))"
"@
pcmpeq<ssemodesuffix>\t{%2, %0|%0, %2}
@@ -13143,7 +13143,7 @@
(gt:VI124_128
(match_operand:VI124_128 1 "register_operand" "0,x")
(match_operand:VI124_128 2 "vector_operand" "xBm,xm")))]
- "TARGET_SSE2 && !TARGET_XOP"
+ "TARGET_SSE2"
"@
pcmpgt<ssemodesuffix>\t{%2, %0|%0, %2}
vpcmpgt<ssemodesuffix>\t{%2, %1, %0|%0, %1, %2}"
diff --git a/gcc/testsuite/gcc.target/i386/pr98833.c b/gcc/testsuite/gcc.target/i386/pr98833.c
new file mode 100644
index 0000000..086c37c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr98833.c
@@ -0,0 +1,9 @@
+/* PR target/98833 */
+/* { dg-do compile } */
+/* { dg-options "-mavx512vl -O2 -mxop" } */
+
+int __attribute__((__vector_size__(4 * sizeof(int)))) * f5_p;
+int __attribute__((__vector_size__(4 * sizeof(int)))) * f6_p;
+
+void f5() { *f5_p = 0 == *f5_p; }
+void f6() { *f5_p = *f6_p > *f5_p; }