a0c5e22b1c06f7feb51f646ff74158cdd3791da3
[oota-llvm.git] / test / CodeGen / X86 / fold-vex.ll
1 ; Use CPU parameters to ensure that a CPU-specific attribute is not overriding the AVX definition.
2
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=corei7-avx | FileCheck %s
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=btver2 | FileCheck %s
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s
6
7 ; No need to load unaligned operand from memory using an explicit instruction with AVX.
8 ; The operand should be folded into the AND instr.
9
10 define <4 x i32> @test1(<4 x i32>* %p0, <4 x i32> %in1) nounwind {
11   %in0 = load <4 x i32>* %p0, align 2
12   %a = and <4 x i32> %in0, %in1
13   ret <4 x i32> %a
14
15 ; CHECK-LABEL: @test1
16 ; CHECK-NOT:   vmovups
17 ; CHECK:       vandps (%rdi), %xmm0, %xmm0
18 ; CHECK-NEXT:  ret
19 }
20