1 ; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=systemz-unknown -mcpu=z13 \
2 ; RUN: | FileCheck %s -check-prefixes=CHECK,Z13
3 ; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=systemz-unknown -mcpu=z14 \
4 ; RUN: | FileCheck %s -check-prefixes=CHECK,Z14
6 define void @fun(i128 %a) {
8 ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c0 = xor i128 %l0, -1
9 ; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res0 = or i128 %a, %c0
10 ; Z14: Cost Model: Found an estimated cost of 0 for instruction: %res0 = or i128 %a, %c0
11 ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c1 = xor i128 %l1, -1
12 ; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %res1 = and i128 %a, %c1
13 ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c2 = and i128 %l2, %a
14 ; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res2 = xor i128 %c2, -1
15 ; Z14: Cost Model: Found an estimated cost of 0 for instruction: %res2 = xor i128 %c2, -1
16 ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c3 = or i128 %l3, %a
17 ; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %res3 = xor i128 %c3, -1
18 ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c4 = xor i128 %l4, %a
19 ; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res4 = xor i128 %c4, -1
20 ; Z14: Cost Model: Found an estimated cost of 0 for instruction: %res4 = xor i128 %c4, -1
22 %l0 = load i128, ptr undef
23 %c0 = xor i128 %l0, -1
24 %res0 = or i128 %a, %c0
25 store i128 %res0, ptr undef
27 %l1 = load i128, ptr undef
28 %c1 = xor i128 %l1, -1
29 %res1 = and i128 %a, %c1
30 store i128 %res1, ptr undef
32 %l2 = load i128, ptr undef
33 %c2 = and i128 %l2, %a
34 %res2 = xor i128 %c2, -1
35 store i128 %res2, ptr undef
37 %l3 = load i128, ptr undef
39 %res3 = xor i128 %c3, -1
40 store i128 %res3, ptr undef
42 %l4 = load i128, ptr undef
43 %c4 = xor i128 %l4, %a
44 %res4 = xor i128 %c4, -1
45 store i128 %res4, ptr undef