Hi, AVX2 change missed convert_to_mode. I checked in this patch as an obvious fix.
Thanks. H.J. --- 2011-08-24 H.J. Lu <hongjiu...@intel.com> PR target/50172 * config/i386/i386.c (ix86_expand_builtin): Convert to Pmode if needed. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 9b5f721..8f11d8f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -27892,6 +27892,8 @@ rdrand_step: /* Force memory operand only with base register here. But we don't want to do it on memory operand for other builtin functions. */ + if (GET_MODE (op1) != Pmode) + op1 = convert_to_mode (Pmode, op1, 1); op1 = force_reg (Pmode, op1); op1 = gen_rtx_MEM (mode1, op1);