From: Simon Pilgrim Date: Wed, 7 Dec 2016 15:06:14 +0000 (+0000) Subject: [X86][SSE] Force execution domain of 32-bit extractps/pextrd in the stack folding... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c57b7e50fc89580f6fa6dc9bb9a020519f481cc1;p=llvm [X86][SSE] Force execution domain of 32-bit extractps/pextrd in the stack folding tests git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288910 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/X86/stack-folding-fp-avx1.ll b/test/CodeGen/X86/stack-folding-fp-avx1.ll index 98e4f99e346..5e939cc034d 100644 --- a/test/CodeGen/X86/stack-folding-fp-avx1.ll +++ b/test/CodeGen/X86/stack-folding-fp-avx1.ll @@ -893,10 +893,12 @@ define i32 @stack_fold_extractps(<4 x float> %a0) { ;CHECK-LABEL: stack_fold_extractps ;CHECK: vextractps $1, {{%xmm[0-9][0-9]*}}, {{-?[0-9]*}}(%rsp) {{.*#+}} 4-byte Folded Spill ;CHECK: movl {{-?[0-9]*}}(%rsp), %eax {{.*#+}} 4-byte Reload - %1 = extractelement <4 x float> %a0, i32 1 - %2 = bitcast float %1 to i32 - %3 = tail call <2 x i64> asm sideeffect "nop", "=x,~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15}"() - ret i32 %2 + ; fadd forces execution domain + %1 = fadd <4 x float> %a0, + %2 = extractelement <4 x float> %1, i32 1 + %3 = bitcast float %2 to i32 + %4 = tail call <2 x i64> asm sideeffect "nop", "=x,~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15}"() + ret i32 %3 } define <2 x double> @stack_fold_haddpd(<2 x double> %a0, <2 x double> %a1) { diff --git a/test/CodeGen/X86/stack-folding-fp-sse42.ll b/test/CodeGen/X86/stack-folding-fp-sse42.ll index bc346a6f229..c57782721a6 100644 --- a/test/CodeGen/X86/stack-folding-fp-sse42.ll +++ b/test/CodeGen/X86/stack-folding-fp-sse42.ll @@ -613,10 +613,12 @@ define i32 @stack_fold_extractps(<4 x float> %a0) { ;CHECK-LABEL: stack_fold_extractps ;CHECK: extractps $1, {{%xmm[0-9][0-9]*}}, {{-?[0-9]*}}(%rsp) {{.*#+}} 4-byte Folded Spill ;CHECK: movl {{-?[0-9]*}}(%rsp), %eax {{.*#+}} 4-byte Reload - %1 = extractelement <4 x float> %a0, i32 1 - %2 = bitcast float %1 to i32 - %3 = tail call <2 x i64> asm sideeffect "nop", "=x,~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15}"() - ret i32 %2 + ; fadd forces execution domain + %1 = fadd <4 x float> %a0, + %2 = extractelement <4 x float> %1, i32 1 + %3 = bitcast float %2 to i32 + %4 = tail call <2 x i64> asm sideeffect "nop", "=x,~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15}"() + ret i32 %3 } define <2 x double> @stack_fold_haddpd(<2 x double> %a0, <2 x double> %a1) { diff --git a/test/CodeGen/X86/stack-folding-int-avx1.ll b/test/CodeGen/X86/stack-folding-int-avx1.ll index 3e3bbb92b54..6e8874ca501 100644 --- a/test/CodeGen/X86/stack-folding-int-avx1.ll +++ b/test/CodeGen/X86/stack-folding-int-avx1.ll @@ -430,9 +430,11 @@ define i32 @stack_fold_pextrd(<4 x i32> %a0) { ;CHECK-LABEL: stack_fold_pextrd ;CHECK: pextrd $1, {{%xmm[0-9][0-9]*}}, {{-?[0-9]*}}(%rsp) {{.*#+}} 4-byte Folded Spill ;CHECK: movl {{-?[0-9]*}}(%rsp), %eax {{.*#+}} 4-byte Reload - %1 = extractelement <4 x i32> %a0, i32 1 - %2 = tail call <2 x i64> asm sideeffect "nop", "=x,~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15}"() - ret i32 %1 + ; add forces execution domain + %1 = add <4 x i32> %a0, + %2 = extractelement <4 x i32> %1, i32 1 + %3 = tail call <2 x i64> asm sideeffect "nop", "=x,~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15}"() + ret i32 %2 } define i64 @stack_fold_pextrq(<2 x i64> %a0) { diff --git a/test/CodeGen/X86/stack-folding-int-sse42.ll b/test/CodeGen/X86/stack-folding-int-sse42.ll index f732607851f..a839a315e76 100644 --- a/test/CodeGen/X86/stack-folding-int-sse42.ll +++ b/test/CodeGen/X86/stack-folding-int-sse42.ll @@ -457,9 +457,11 @@ define i32 @stack_fold_pextrd(<4 x i32> %a0) { ;CHECK-LABEL: stack_fold_pextrd ;CHECK: pextrd $1, {{%xmm[0-9][0-9]*}}, {{-?[0-9]*}}(%rsp) {{.*#+}} 4-byte Folded Spill ;CHECK: movl {{-?[0-9]*}}(%rsp), %eax {{.*#+}} 4-byte Reload - %1 = extractelement <4 x i32> %a0, i32 1 - %2 = tail call <2 x i64> asm sideeffect "nop", "=x,~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15}"() - ret i32 %1 + ; add forces execution domain + %1 = add <4 x i32> %a0, + %2 = extractelement <4 x i32> %1, i32 1 + %3 = tail call <2 x i64> asm sideeffect "nop", "=x,~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15}"() + ret i32 %2 } define i64 @stack_fold_pextrq(<2 x i64> %a0) {