1c89d9d8aSJuneyoung Lee; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py 24178e334SSimon Pilgrim; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s --check-prefix=CHECK-THROUGHPUT 34178e334SSimon Pilgrim; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s --check-prefix=CHECK-SIZE 4c89d9d8aSJuneyoung Lee 5c89d9d8aSJuneyoung Leedefine void @op() { 6c89d9d8aSJuneyoung Lee ; Logical and/or - select's cost must be equivalent to that of binop 7c89d9d8aSJuneyoung Lee; CHECK-THROUGHPUT-LABEL: 'op' 8c89d9d8aSJuneyoung Lee; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sand = select i1 undef, i1 undef, i1 false 9c89d9d8aSJuneyoung Lee; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %band = and i1 undef, undef 10c89d9d8aSJuneyoung Lee; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sor = select i1 undef, i1 true, i1 undef 11c89d9d8aSJuneyoung Lee; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bor = or i1 undef, undef 12c89d9d8aSJuneyoung Lee; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void 13c89d9d8aSJuneyoung Lee; 14c89d9d8aSJuneyoung Lee; CHECK-SIZE-LABEL: 'op' 15c89d9d8aSJuneyoung Lee; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sand = select i1 undef, i1 undef, i1 false 16c89d9d8aSJuneyoung Lee; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %band = and i1 undef, undef 17c89d9d8aSJuneyoung Lee; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sor = select i1 undef, i1 true, i1 undef 18c89d9d8aSJuneyoung Lee; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bor = or i1 undef, undef 19c89d9d8aSJuneyoung Lee; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void 20c89d9d8aSJuneyoung Lee; 21c89d9d8aSJuneyoung Lee %sand = select i1 undef, i1 undef, i1 false 22c89d9d8aSJuneyoung Lee %band = and i1 undef, undef 23c89d9d8aSJuneyoung Lee %sor = select i1 undef, i1 true, i1 undef 24c89d9d8aSJuneyoung Lee %bor = or i1 undef, undef 25c89d9d8aSJuneyoung Lee 26c89d9d8aSJuneyoung Lee ret void 27c89d9d8aSJuneyoung Lee} 28c89d9d8aSJuneyoung Lee 29c89d9d8aSJuneyoung Leedefine void @vecop() { 30c89d9d8aSJuneyoung Lee; CHECK-THROUGHPUT-LABEL: 'vecop' 31c89d9d8aSJuneyoung Lee; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sand = select <4 x i1> undef, <4 x i1> undef, <4 x i1> zeroinitializer 32c89d9d8aSJuneyoung Lee; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %band = and <4 x i1> undef, undef 33*38fffa63SPaul Walker; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sor = select <4 x i1> undef, <4 x i1> splat (i1 true), <4 x i1> undef 34c89d9d8aSJuneyoung Lee; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bor = or <4 x i1> undef, undef 35c89d9d8aSJuneyoung Lee; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void 36c89d9d8aSJuneyoung Lee; 37c89d9d8aSJuneyoung Lee; CHECK-SIZE-LABEL: 'vecop' 38c89d9d8aSJuneyoung Lee; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sand = select <4 x i1> undef, <4 x i1> undef, <4 x i1> zeroinitializer 39c89d9d8aSJuneyoung Lee; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %band = and <4 x i1> undef, undef 40*38fffa63SPaul Walker; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sor = select <4 x i1> undef, <4 x i1> splat (i1 true), <4 x i1> undef 41c89d9d8aSJuneyoung Lee; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bor = or <4 x i1> undef, undef 42c89d9d8aSJuneyoung Lee; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void 43c89d9d8aSJuneyoung Lee; 44c89d9d8aSJuneyoung Lee %sand = select <4 x i1> undef, <4 x i1> undef, <4 x i1> <i1 false, i1 false, i1 false, i1 false> 45c89d9d8aSJuneyoung Lee %band = and <4 x i1> undef, undef 46c89d9d8aSJuneyoung Lee %sor = select <4 x i1> undef, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> undef 47c89d9d8aSJuneyoung Lee %bor = or <4 x i1> undef, undef 48c89d9d8aSJuneyoung Lee 49c89d9d8aSJuneyoung Lee ret void 50c89d9d8aSJuneyoung Lee} 51