This is a followup to https://github.com/llvm/llvm-project/pull/171288, which removed lowering of libcalls to SDAG nodes for most libcalls that get unconditionally canonicalized to intrinsics. This handles the remaining fabs case, which I originally skipped due to larger test impact.
11 lines
343 B
LLVM
11 lines
343 B
LLVM
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- | grep fnabs
|
|
|
|
declare double @llvm.fabs.f64(double)
|
|
|
|
define double @test(double %X) {
|
|
%Y = call double @llvm.fabs.f64( double %X ) readnone ; <double> [#uses=1]
|
|
%Z = fsub double -0.000000e+00, %Y ; <double> [#uses=1]
|
|
ret double %Z
|
|
}
|
|
|