If the getRegisterBitWidth is zero (such as in sme streaming functions), then we could hit a crash from using % RegWidth.
19 lines
929 B
LLVM
19 lines
929 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64-unknown-linux -mattr=+sme | FileCheck %s
|
|
|
|
define double @extract_case7(<4 x double> %a) "aarch64_pstate_sm_enabled" {
|
|
; CHECK-LABEL: 'extract_case7'
|
|
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %0 = extractelement <4 x double> %a, i32 1
|
|
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %1 = extractelement <4 x double> %a, i32 2
|
|
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res = fmul double %0, %1
|
|
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %res
|
|
;
|
|
entry:
|
|
%1 = extractelement <4 x double> %a, i32 1
|
|
%2 = extractelement <4 x double> %a, i32 2
|
|
%res = fmul double %1, %2
|
|
ret double %res
|
|
}
|
|
|
|
declare void @foo(double)
|