xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/2011-12-8-bitcastintprom.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; Make sure that the conversion between v4i8 to v2i16 is not a simple bitcast.
4*9880d681SAndroid Build Coastguard Worker; CHECK: prom_bug
5*9880d681SAndroid Build Coastguard Worker; CHECK: shufb
6*9880d681SAndroid Build Coastguard Worker; CHECK: movd
7*9880d681SAndroid Build Coastguard Worker; CHECK: movw
8*9880d681SAndroid Build Coastguard Worker; CHECK: ret
9*9880d681SAndroid Build Coastguard Workerdefine void @prom_bug(<4 x i8> %t, i16* %p) {
10*9880d681SAndroid Build Coastguard Worker  %r = bitcast <4 x i8> %t to <2 x i16>
11*9880d681SAndroid Build Coastguard Worker  %o = extractelement <2 x i16> %r, i32 0
12*9880d681SAndroid Build Coastguard Worker  store i16 %o, i16* %p
13*9880d681SAndroid Build Coastguard Worker  ret void
14*9880d681SAndroid Build Coastguard Worker}
15*9880d681SAndroid Build Coastguard Worker
16