llvm-for-llvmta/test/CodeGen/PowerPC/fsqrt.ll

22 lines
626 B
LLVM
Raw Normal View History

2022-04-25 10:02:23 +02:00
; fsqrt should be generated when the fsqrt feature is enabled, but not
; otherwise.
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-unknown-linux-gnu -mattr=+fsqrt | FileCheck %s -check-prefix=SQRT
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-unknown-linux-gnu -mattr=-fsqrt | FileCheck %s -check-prefix=NSQRT
; SQRT: X:
; SQRT: fsqrt 1, 1
; SQRT: blr
; NSQRT: X:
; NSQRT-NOT: fsqrt 1, 1
; NSQRT: blr
declare double @llvm.sqrt.f64(double)
define double @X(double %Y) {
%Z = call double @llvm.sqrt.f64( double %Y ) ; <double> [#uses=1]
ret double %Z
}