This fixes vectorized_internal_fn_supported_p behavior when
facing vector types with an integer mode.
2022-02-11 Richard Biener <rguenther@suse.de>
PR middle-end/104496
* internal-fn.cc (vectorized_internal_fn_supported_p):
Bail out for integer mode vector types.
* gcc.target/i386/pr104496.c: New testcase.
return direct_internal_fn_supported_p (ifn, type, OPTIMIZE_FOR_SPEED);
scalar_mode smode;
- if (!is_a <scalar_mode> (TYPE_MODE (type), &smode))
+ if (VECTOR_TYPE_P (type)
+ || !is_a <scalar_mode> (TYPE_MODE (type), &smode))
return false;
machine_mode vmode = targetm.vectorize.preferred_simd_mode (smode);
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -mgeneral-regs-only -msse" } */
+
+typedef int __attribute__((__vector_size__ (8))) V;
+V a, b;
+int c;
+
+void
+foo (void)
+{
+ b = 0 != a | b << c;
+}