
Similar to 806761a7629df268c8aed49657aeccffa6bca449 -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple, leaving a target triple which may not make sense. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it outrightly.
31 lines
775 B
LLVM
31 lines
775 B
LLVM
; Test for checking division is inlined or not in case of Os.
|
|
; RUN: llc -O2 -mtriple=hexagon < %s | FileCheck %s
|
|
|
|
; Function Attrs: optsize
|
|
define dso_local i32 @testInt(i32 %a, i32 %b) local_unnamed_addr #0 {
|
|
entry:
|
|
;CHECK: call __hexagon_divsi3
|
|
%div = sdiv i32 %a, %b
|
|
%conv = sitofp i32 %div to float
|
|
%conv1 = fptosi float %conv to i32
|
|
ret i32 %conv1
|
|
}
|
|
|
|
; Function Attrs: optsize
|
|
define dso_local float @testFloat(float %a, float %b) local_unnamed_addr #0 {
|
|
entry:
|
|
;CHECK: call __hexagon_divsf3
|
|
%div = fdiv float %a, %b
|
|
ret float %div
|
|
}
|
|
|
|
; Function Attrs: optsize
|
|
define dso_local double @testDouble(double %a, double %b) local_unnamed_addr #0 {
|
|
entry:
|
|
;CHECK: call __hexagon_divdf3
|
|
%div = fdiv double %a, %b
|
|
ret double %div
|
|
}
|
|
|
|
attributes #0 = { optsize }
|