diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index c66b234a514..b55cb58078d 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -18897,9 +18897,9 @@ tmp = "pternlog"; ssesuffix = ""; if (which_alternative != 4 || TARGET_AVX512VL) - ops = "v%s%s\t{$0x44, %%1, %%2, %%0|%%0, %%2, %%1, $0x44}"; + ops = "v%s%s\t{$0x44, %%1, %%2, %%0|%%0, %%2, %%1, 0x44}"; else - ops = "v%s%s\t{$0x44, %%g1, %%g2, %%g0|%%g0, %%g2, %%g1, $0x44}"; + ops = "v%s%s\t{$0x44, %%g1, %%g2, %%g0|%%g0, %%g2, %%g1, 0x44}"; break; default: gcc_unreachable (); diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-pr124367.c b/gcc/testsuite/gcc.target/i386/avx512vl-pr124367.c new file mode 100644 index 00000000000..72646103ca1 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512vl-pr124367.c @@ -0,0 +1,14 @@ +/* PR target/124367 */ +/* { dg-do assemble { target { { int128 && avx512vl } && masm_intel } } } */ +/* { dg-options "-O -mavx512vl -masm=intel" } */ + +union { + __int128 a; + __attribute__((__vector_size__(sizeof (__int128)))) long long b; +} u; + +void +foo () +{ + u.b ^= 0 > u.a | u.b; +}