Hello! We have to expand SSE moves through x86_expand_vector_operand, otherwise unsupported push instructions are generated among other possible troubles.
2016-03-21 Uros Bizjak <ubiz...@gmail.com> PR target/70327 * config/i386/i386.md (movxi): Use ix86_expand_vector_move instead of ix86_expand_move. (movoi): Ditto. (movti): Use general_operand for operand 1 predicate. testsuite/ChangeLog: 2016-03-21 Uros Bizjak <ubiz...@gmail.com> PR target/70327 * gcc.target/i386/pr70327.c: New test. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. The patch was committed to mainline SVN, will be committed to other release branches. Uros.
Index: config/i386/i386.md =================================================================== --- config/i386/i386.md (revision 234372) +++ config/i386/i386.md (working copy) @@ -1878,7 +1878,7 @@ [(set (match_operand:XI 0 "nonimmediate_operand") (match_operand:XI 1 "general_operand"))] "TARGET_AVX512F" - "ix86_expand_move (XImode, operands); DONE;") + "ix86_expand_vector_move (XImode, operands); DONE;") ;; Reload patterns to support multi-word load/store ;; with non-offsetable address. @@ -1918,11 +1918,11 @@ [(set (match_operand:OI 0 "nonimmediate_operand") (match_operand:OI 1 "general_operand"))] "TARGET_AVX" - "ix86_expand_move (OImode, operands); DONE;") + "ix86_expand_vector_move (OImode, operands); DONE;") (define_expand "movti" [(set (match_operand:TI 0 "nonimmediate_operand") - (match_operand:TI 1 "nonimmediate_operand"))] + (match_operand:TI 1 "general_operand"))] "TARGET_64BIT || TARGET_SSE" { if (TARGET_64BIT) Index: testsuite/gcc.target/i386/pr70327.c =================================================================== --- testsuite/gcc.target/i386/pr70327.c (nonexistent) +++ testsuite/gcc.target/i386/pr70327.c (working copy) @@ -0,0 +1,12 @@ +/* PR target/70327 */ +/* { dg-do compile } */ +/* { dg-require-effective-target int128 } */ +/* { dg-options "-mavx512f" } */ + +typedef unsigned __int128 v4ti __attribute__ ((vector_size (64))); + +void +foo (v4ti v) +{ + foo(v); +}