xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/2012-03-13-DAGCombineBug.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=thumbv7-apple-ios | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; rdar://11035895
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; DAG combine incorrectly optimize (i32 vextract (v4i16 load $addr), c) to
5*9880d681SAndroid Build Coastguard Worker; (i16 load $addr+c*sizeof(i16)). It should have issued an extload instead. i.e.
6*9880d681SAndroid Build Coastguard Worker; (i32 extload $addr+c*sizeof(i16)
7*9880d681SAndroid Build Coastguard Workerdefine void @test_hi_short3(<3 x i16> * nocapture %srcA, <2 x i16> * nocapture %dst) nounwind {
8*9880d681SAndroid Build Coastguard Workerentry:
9*9880d681SAndroid Build Coastguard Worker; CHECK: vst1.32
10*9880d681SAndroid Build Coastguard Worker  %0 = load <3 x i16> , <3 x i16> * %srcA, align 8
11*9880d681SAndroid Build Coastguard Worker  %1 = shufflevector <3 x i16> %0, <3 x i16> undef, <2 x i32> <i32 2, i32 undef>
12*9880d681SAndroid Build Coastguard Worker  store <2 x i16> %1, <2 x i16> * %dst, align 4
13*9880d681SAndroid Build Coastguard Worker  ret void
14*9880d681SAndroid Build Coastguard Worker}
15*9880d681SAndroid Build Coastguard Worker
16