brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.0 KiB · cd5c8c5 Raw
99 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=thumbv8.1m.main-none-eabi < %s | FileCheck %s3 4target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"5 6define void @shl(i32 %a, i32 %b) {7; CHECK-LABEL: 'shl'8; CHECK-NEXT:  Cost Model: Found costs of 0 for: %as = shl i32 %a, 39; CHECK-NEXT:  Cost Model: Found costs of 1 for: %ac = add i32 %b, %as10; CHECK-NEXT:  Cost Model: Found costs of 0 for: %ss = shl i32 %a, 311; CHECK-NEXT:  Cost Model: Found costs of 1 for: %sc = sub i32 %b, %ss12; CHECK-NEXT:  Cost Model: Found costs of 0 for: %xs = shl i32 %a, 313; CHECK-NEXT:  Cost Model: Found costs of 1 for: %xc = xor i32 %b, %xs14; CHECK-NEXT:  Cost Model: Found costs of 0 for: %ns = shl i32 %a, 315; CHECK-NEXT:  Cost Model: Found costs of 1 for: %nc = and i32 %b, %ns16; CHECK-NEXT:  Cost Model: Found costs of 0 for: %os = shl i32 %a, 317; CHECK-NEXT:  Cost Model: Found costs of 1 for: %oc = or i32 %b, %os18; CHECK-NEXT:  Cost Model: Found costs of 0 for: %is = shl i32 %a, 319; CHECK-NEXT:  Cost Model: Found costs of 1 for: %ic = icmp eq i32 %b, %is20; CHECK-NEXT:  Cost Model: Found costs of 1 for: ret void21;22  %as = shl i32 %a, 323  %ac = add i32 %b, %as24  %ss = shl i32 %a, 325  %sc = sub i32 %b, %ss26  %xs = shl i32 %a, 327  %xc = xor i32 %b, %xs28  %ns = shl i32 %a, 329  %nc = and i32 %b, %ns30  %os = shl i32 %a, 331  %oc = or i32 %b, %os32  %is = shl i32 %a, 333  %ic = icmp eq i32 %b, %is34  ret void35}36 37define void @ashr(i32 %a, i32 %b) {38; CHECK-LABEL: 'ashr'39; CHECK-NEXT:  Cost Model: Found costs of 0 for: %as = ashr i32 %a, 340; CHECK-NEXT:  Cost Model: Found costs of 1 for: %ac = add i32 %b, %as41; CHECK-NEXT:  Cost Model: Found costs of 0 for: %ss = ashr i32 %a, 342; CHECK-NEXT:  Cost Model: Found costs of 1 for: %sc = sub i32 %b, %ss43; CHECK-NEXT:  Cost Model: Found costs of 0 for: %xs = ashr i32 %a, 344; CHECK-NEXT:  Cost Model: Found costs of 1 for: %xc = xor i32 %b, %xs45; CHECK-NEXT:  Cost Model: Found costs of 0 for: %ns = ashr i32 %a, 346; CHECK-NEXT:  Cost Model: Found costs of 1 for: %nc = and i32 %b, %ns47; CHECK-NEXT:  Cost Model: Found costs of 0 for: %os = ashr i32 %a, 348; CHECK-NEXT:  Cost Model: Found costs of 1 for: %oc = or i32 %b, %os49; CHECK-NEXT:  Cost Model: Found costs of 0 for: %is = ashr i32 %a, 350; CHECK-NEXT:  Cost Model: Found costs of 1 for: %ic = icmp eq i32 %b, %is51; CHECK-NEXT:  Cost Model: Found costs of 1 for: ret void52;53  %as = ashr i32 %a, 354  %ac = add i32 %b, %as55  %ss = ashr i32 %a, 356  %sc = sub i32 %b, %ss57  %xs = ashr i32 %a, 358  %xc = xor i32 %b, %xs59  %ns = ashr i32 %a, 360  %nc = and i32 %b, %ns61  %os = ashr i32 %a, 362  %oc = or i32 %b, %os63  %is = ashr i32 %a, 364  %ic = icmp eq i32 %b, %is65  ret void66}67 68define void @lshr(i32 %a, i32 %b) {69; CHECK-LABEL: 'lshr'70; CHECK-NEXT:  Cost Model: Found costs of 0 for: %as = lshr i32 %a, 371; CHECK-NEXT:  Cost Model: Found costs of 1 for: %ac = add i32 %b, %as72; CHECK-NEXT:  Cost Model: Found costs of 0 for: %ss = lshr i32 %a, 373; CHECK-NEXT:  Cost Model: Found costs of 1 for: %sc = sub i32 %b, %ss74; CHECK-NEXT:  Cost Model: Found costs of 0 for: %xs = lshr i32 %a, 375; CHECK-NEXT:  Cost Model: Found costs of 1 for: %xc = xor i32 %b, %xs76; CHECK-NEXT:  Cost Model: Found costs of 0 for: %ns = lshr i32 %a, 377; CHECK-NEXT:  Cost Model: Found costs of 1 for: %nc = and i32 %b, %ns78; CHECK-NEXT:  Cost Model: Found costs of 0 for: %os = lshr i32 %a, 379; CHECK-NEXT:  Cost Model: Found costs of 1 for: %oc = or i32 %b, %os80; CHECK-NEXT:  Cost Model: Found costs of 0 for: %is = lshr i32 %a, 381; CHECK-NEXT:  Cost Model: Found costs of 1 for: %ic = icmp eq i32 %b, %is82; CHECK-NEXT:  Cost Model: Found costs of 1 for: ret void83;84  %as = lshr i32 %a, 385  %ac = add i32 %b, %as86  %ss = lshr i32 %a, 387  %sc = sub i32 %b, %ss88  %xs = lshr i32 %a, 389  %xc = xor i32 %b, %xs90  %ns = lshr i32 %a, 391  %nc = and i32 %b, %ns92  %os = lshr i32 %a, 393  %oc = or i32 %b, %os94  %is = lshr i32 %a, 395  %ic = icmp eq i32 %b, %is96  ret void97}98 99