Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/PhaseOrdering/fmf-select-abs.ll
- This file was added.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | |||||
; RUN: opt < %s -S -O1 | FileCheck %s | |||||
; Function Attrs: mustprogress nounwind uwtable | |||||
define dso_local double @foo(double %x) #0 { | |||||
; CHECK-LABEL: @foo( | |||||
; CHECK-NEXT: entry: | |||||
; CHECK-NEXT: [[TMP0:%.*]] = call reassoc nnan ninf nsz arcp afn double @llvm.fabs.f64(double [[X:%.*]]) | |||||
; CHECK-NEXT: ret double [[TMP0]] | |||||
; | |||||
entry: | |||||
%retval = alloca double, align 8 | |||||
%x.addr = alloca double, align 8 | |||||
store double %x, double* %x.addr, align 8 | |||||
%0 = load double, double* %x.addr, align 8 | |||||
%cmp = fcmp fast olt double %0, 0.000000e+00 | |||||
br i1 %cmp, label %if.then, label %if.else | |||||
if.then: ; preds = %entry | |||||
%1 = load double, double* %x.addr, align 8 | |||||
%fneg = fneg fast double %1 | |||||
store double %fneg, double* %retval, align 8 | |||||
br label %return | |||||
if.else: ; preds = %entry | |||||
%2 = load double, double* %x.addr, align 8 | |||||
store double %2, double* %retval, align 8 | |||||
br label %return | |||||
return: ; preds = %if.else, %if.then | |||||
%3 = load double, double* %retval, align 8 | |||||
ret double %3 | |||||
} | |||||
attributes #0 = { mustprogress nounwind uwtable "approx-func-fp-math"="true" "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="cortex-a76" "unsafe-fp-math"="true" } |