PR target/78227
* config/i386/i386.c (ix86_expand_sse_cmp): Force dest into
cmp_mode argument even for -O0 if cmp_mode != mode and maskcmp.
* gcc.target/i386/pr78227-1.c: New test.
* gcc.target/i386/pr78227-2.c: New test.
From-SVN: r241916
+2016-11-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78227
+ * config/i386/i386.c (ix86_expand_sse_cmp): Force dest into
+ cmp_mode argument even for -O0 if cmp_mode != mode and maskcmp.
+
2016-11-07 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR middle-end/35691
cmp_op1 = force_reg (cmp_ops_mode, cmp_op1);
if (optimize
+ || (maskcmp && cmp_mode != mode)
|| (op_true && reg_overlap_mentioned_p (dest, op_true))
|| (op_false && reg_overlap_mentioned_p (dest, op_false)))
dest = gen_reg_rtx (maskcmp ? cmp_mode : mode);
+2016-11-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78227
+ * gcc.target/i386/pr78227-1.c: New test.
+ * gcc.target/i386/pr78227-2.c: New test.
+
2016-11-07 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR middle-end/35691
--- /dev/null
+/* PR target/78227 */
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O0 -Wno-psabi" } */
+
+typedef int V __attribute__((vector_size (64)));
+typedef long long int W __attribute__((vector_size (64)));
+
+V
+foo1 (V v)
+{
+ return v > 0;
+}
+
+V
+bar1 (V v)
+{
+ return v != 0;
+}
+
+W
+foo2 (W w)
+{
+ return w > 0;
+}
+
+W
+bar2 (W w)
+{
+ return w != 0;
+}
--- /dev/null
+/* PR target/78227 */
+/* { dg-do compile } */
+/* { dg-options "-mavx512bw -O0 -Wno-psabi" } */
+
+typedef signed char V __attribute__((vector_size (64)));
+typedef short int W __attribute__((vector_size (64)));
+
+V
+foo1 (V v)
+{
+ return v > 0;
+}
+
+V
+bar1 (V v)
+{
+ return v != 0;
+}
+
+W
+foo2 (W w)
+{
+ return w > 0;
+}
+
+W
+bar2 (W w)
+{
+ return w != 0;
+}