xref: /aosp_15_r20/external/llvm/test/Analysis/CostModel/PowerPC/ext.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -cost-model -analyze -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=+vsx | FileCheck %s
2*9880d681SAndroid Build Coastguard Workertarget datalayout = "E-m:e-i64:64-n32:64"
3*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc64-unknown-linux-gnu"
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine void @exts() {
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker  ; CHECK: cost of 1 {{.*}} sext
8*9880d681SAndroid Build Coastguard Worker  %v1 = sext i16 undef to i32
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker  ; CHECK: cost of 1 {{.*}} sext
11*9880d681SAndroid Build Coastguard Worker  %v2 = sext <2 x i16> undef to <2 x i32>
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker  ; CHECK: cost of 1 {{.*}} sext
14*9880d681SAndroid Build Coastguard Worker  %v3 = sext <4 x i16> undef to <4 x i32>
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker  ; CHECK: cost of 3 {{.*}} sext
17*9880d681SAndroid Build Coastguard Worker  %v4 = sext <8 x i16> undef to <8 x i32>
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker  ret void
20*9880d681SAndroid Build Coastguard Worker}
21*9880d681SAndroid Build Coastguard Worker
22