brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 0d3216e Raw
38 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s  -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=arm64-apple-ios -mcpu=cyclone | FileCheck %s3 4target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"5 6define void @op() {7  ; Logical and/or - select's cost must be equivalent to that of binop8; CHECK-LABEL: 'op'9; CHECK-NEXT:  Cost Model: Found costs of 1 for: %sand = select i1 undef, i1 undef, i1 false10; CHECK-NEXT:  Cost Model: Found costs of 1 for: %band = and i1 undef, undef11; CHECK-NEXT:  Cost Model: Found costs of 1 for: %sor = select i1 undef, i1 true, i1 undef12; CHECK-NEXT:  Cost Model: Found costs of 1 for: %bor = or i1 undef, undef13; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void14;15  %sand = select i1 undef, i1 undef, i1 false16  %band = and i1 undef, undef17  %sor = select i1 undef, i1 true, i1 undef18  %bor = or i1 undef, undef19 20  ret void21}22 23define void @vecop() {24; CHECK-LABEL: 'vecop'25; CHECK-NEXT:  Cost Model: Found costs of 1 for: %sand = select <4 x i1> undef, <4 x i1> undef, <4 x i1> zeroinitializer26; CHECK-NEXT:  Cost Model: Found costs of 1 for: %band = and <4 x i1> undef, undef27; CHECK-NEXT:  Cost Model: Found costs of 1 for: %sor = select <4 x i1> undef, <4 x i1> splat (i1 true), <4 x i1> undef28; CHECK-NEXT:  Cost Model: Found costs of 1 for: %bor = or <4 x i1> undef, undef29; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void30;31  %sand = select <4 x i1> undef, <4 x i1> undef, <4 x i1> <i1 false, i1 false, i1 false, i1 false>32  %band = and <4 x i1> undef, undef33  %sor = select <4 x i1> undef, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> undef34  %bor = or <4 x i1> undef, undef35 36  ret void37}38