[TwoAddressInstructionPass] When looking for a 3 addr conversion after commuting...
[oota-llvm.git] / test / CodeGen / X86 / and-load-fold.ll
1 ; RUN: llc -mtriple=x86_64-unknown-unknown -mcpu=generic < %s | FileCheck %s
2
3 ; Verify that the DAGCombiner doesn't wrongly remove the 'and' from the dag.
4
5 define i8 @foo(<4 x i8>* %V) {
6 ; CHECK-LABEL: foo:
7 ; CHECK: pand
8 ; CHECK: ret
9 entry:
10   %Vp = bitcast <4 x i8>* %V to <3 x i8>*
11   %V3i8 = load <3 x i8>, <3 x i8>* %Vp, align 4
12   %0 = and <3 x i8> %V3i8, <i8 undef, i8 undef, i8 95>
13   %1 = extractelement <3 x i8> %0, i64 2
14   ret i8 %1
15 }