brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · c98601f Raw
29 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=armv8r-none-eabi < %s | FileCheck %s3 4; Check memory cost model action for a load of an unusually sized integer5; follow by and a trunc to a register sized integer gives a cost of 1 rather6; than the expanded cost if it is not.  Currently, this target does not have7; that expansion.8 9; Check that cost is 1 for unusual load to register sized load.10define i32 @loadUnusualIntegerWithTrunc(ptr %ptr) {11; CHECK-LABEL: 'loadUnusualIntegerWithTrunc'12; CHECK-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:1 for: %out = load i128, ptr %ptr, align 813; CHECK-NEXT:  Cost Model: Found costs of 0 for: %trunc = trunc i128 %out to i3214; CHECK-NEXT:  Cost Model: Found costs of 1 for: ret i32 %trunc15;16  %out = load i128, ptr %ptr17  %trunc = trunc i128 %out to i3218  ret i32 %trunc19}20 21define i128 @loadUnusualInteger(ptr %ptr) {22; CHECK-LABEL: 'loadUnusualInteger'23; CHECK-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:1 for: %out = load i128, ptr %ptr, align 824; CHECK-NEXT:  Cost Model: Found costs of 1 for: ret i128 %out25;26  %out = load i128, ptr %ptr27  ret i128 %out28}29