98 lines · plain
1; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=systemz-unknown -mcpu=z13 \2; RUN: | FileCheck %s -check-prefixes=CHECK,Z133; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=systemz-unknown -mcpu=z15 \4; RUN: | FileCheck %s -check-prefixes=CHECK,Z155 6define void @fun0(i32 %a) {7; CHECK-LABEL: function 'fun0'8; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c0 = xor i32 %l0, -19; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res0 = or i32 %a, %c010; Z15: Cost Model: Found an estimated cost of 0 for instruction: %res0 = or i32 %a, %c011; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c1 = xor i32 %l1, -112; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res1 = and i32 %a, %c113; Z15: Cost Model: Found an estimated cost of 0 for instruction: %res1 = and i32 %a, %c114; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c2 = and i32 %l2, %a15; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res2 = xor i32 %c2, -116; Z15: Cost Model: Found an estimated cost of 0 for instruction: %res2 = xor i32 %c2, -117; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c3 = or i32 %l3, %a18; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res3 = xor i32 %c3, -119; Z15: Cost Model: Found an estimated cost of 0 for instruction: %res3 = xor i32 %c3, -120; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c4 = xor i32 %l4, %a21; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res4 = xor i32 %c4, -122; Z15: Cost Model: Found an estimated cost of 0 for instruction: %res4 = xor i32 %c4, -123 24entry:25 %l0 = load i32, ptr undef26 %c0 = xor i32 %l0, -127 %res0 = or i32 %a, %c028 store i32 %res0, ptr undef29 30 %l1 = load i32, ptr undef31 %c1 = xor i32 %l1, -132 %res1 = and i32 %a, %c133 store i32 %res1, ptr undef34 35 %l2 = load i32, ptr undef36 %c2 = and i32 %l2, %a37 %res2 = xor i32 %c2, -138 store i32 %res2, ptr undef39 40 %l3 = load i32, ptr undef41 %c3 = or i32 %l3, %a42 %res3 = xor i32 %c3, -143 store i32 %res3, ptr undef44 45 %l4 = load i32, ptr undef46 %c4 = xor i32 %l4, %a47 %res4 = xor i32 %c4, -148 store i32 %res4, ptr undef49 50 ret void51}52 53define void @fun1(i64 %a) {54; CHECK-LABEL: function 'fun1'55; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c0 = xor i64 %l0, -156; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res0 = or i64 %a, %c057; Z15: Cost Model: Found an estimated cost of 0 for instruction: %res0 = or i64 %a, %c058; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c1 = xor i64 %l1, -159; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res1 = and i64 %a, %c160; Z15: Cost Model: Found an estimated cost of 0 for instruction: %res1 = and i64 %a, %c161; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c2 = and i64 %l2, %a62; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res2 = xor i64 %c2, -163; Z15: Cost Model: Found an estimated cost of 0 for instruction: %res2 = xor i64 %c2, -164; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c3 = or i64 %l3, %a65; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res3 = xor i64 %c3, -166; Z15: Cost Model: Found an estimated cost of 0 for instruction: %res3 = xor i64 %c3, -167; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %c4 = xor i64 %l4, %a68; Z13: Cost Model: Found an estimated cost of 1 for instruction: %res4 = xor i64 %c4, -169; Z15: Cost Model: Found an estimated cost of 0 for instruction: %res4 = xor i64 %c4, -170entry:71 %l0 = load i64, ptr undef72 %c0 = xor i64 %l0, -173 %res0 = or i64 %a, %c074 store i64 %res0, ptr undef75 76 %l1 = load i64, ptr undef77 %c1 = xor i64 %l1, -178 %res1 = and i64 %a, %c179 store i64 %res1, ptr undef80 81 %l2 = load i64, ptr undef82 %c2 = and i64 %l2, %a83 %res2 = xor i64 %c2, -184 store i64 %res2, ptr undef85 86 %l3 = load i64, ptr undef87 %c3 = or i64 %l3, %a88 %res3 = xor i64 %c3, -189 store i64 %res3, ptr undef90 91 %l4 = load i64, ptr undef92 %c4 = xor i64 %l4, %a93 %res4 = xor i64 %c4, -194 store i64 %res4, ptr undef95 96 ret void97}98