]>
Commit | Line | Data |
---|---|---|
b8c2c3e7 JP |
1 | Index: gcc/testsuite/gcc.target/i386/pr81481.c |
2 | =================================================================== | |
3 | --- gcc/testsuite/gcc.target/i386/pr81481.c (nonexistent) | |
4 | +++ gcc/testsuite/gcc.target/i386/pr81481.c (revision 253300) | |
5 | @@ -0,0 +1,18 @@ | |
6 | +/* { dg-do compile } */ | |
7 | +/* { dg-require-effective-target ssse3 } */ | |
8 | +/* { dg-options "-O2 -fpic -mssse3" } */ | |
9 | +/* { dg-final { scan-assembler-not "pshufb\[ \t\]\\(%esp\\)" } } */ | |
10 | +#include <immintrin.h> | |
11 | + | |
12 | +extern const signed char c[31] __attribute__((visibility("hidden"))); | |
13 | + | |
14 | +__m128i f(__m128i *x, void *v) | |
15 | +{ | |
16 | + int i; | |
17 | + asm("# %0" : "=r"(i)); | |
18 | + __m128i t = _mm_loadu_si128((void*)&c[i]); | |
19 | + __m128i xx = *x; | |
20 | + xx = _mm_shuffle_epi8(xx, t); | |
21 | + asm("# %0 %1 %2" : "+x"(xx) : "r"(c), "r"(i)); | |
22 | + return xx; | |
23 | +} | |
24 | Index: gcc/ira-costs.c | |
25 | =================================================================== | |
26 | --- gcc/ira-costs.c (revision 253299) | |
27 | +++ gcc/ira-costs.c (revision 253300) | |
28 | @@ -1471,7 +1471,10 @@ | |
29 | && targetm.legitimate_constant_p (GET_MODE (SET_DEST (set)), | |
30 | XEXP (note, 0)) | |
31 | && REG_N_SETS (REGNO (SET_DEST (set))) == 1)) | |
32 | - && general_operand (SET_SRC (set), GET_MODE (SET_SRC (set)))) | |
33 | + && general_operand (SET_SRC (set), GET_MODE (SET_SRC (set))) | |
34 | + /* LRA does not use equiv with a symbol for PIC code. */ | |
35 | + && (! ira_use_lra_p || ! pic_offset_table_rtx | |
36 | + || ! contains_symbol_ref_p (XEXP (note, 0)))) | |
37 | { | |
38 | enum reg_class cl = GENERAL_REGS; | |
39 | rtx reg = SET_DEST (set); |