mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Teach InstCombine not to use Add and Neg on FP. PR 8490.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117510 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
f40deed62f
commit
f514f52790
2 files changed
+28
-1
No files matched your search
@@ -0,0 +1,20 @@
|
||||
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||
; Formerly crashed, PR8490.
|
||||
|
||||
define fastcc double @gimp_operation_color_balance_map(float %value, double %highlights) nounwind readnone inlinehint {
|
||||
entry:
|
||||
; CHECK: gimp_operation_color_balance_map
|
||||
; CHECK: fsub double -0.000000
|
||||
%conv = fpext float %value to double
|
||||
%div = fdiv double %conv, 1.600000e+01
|
||||
%add = fadd double %div, 1.000000e+00
|
||||
%div1 = fdiv double 1.000000e+00, %add
|
||||
%sub = fsub double 1.075000e+00, %div1
|
||||
%sub24 = fsub double 1.000000e+00, %sub
|
||||
%add26 = fadd double %sub, 1.000000e+00
|
||||
%cmp86 = fcmp ogt double %highlights, 0.000000e+00
|
||||
%cond90 = select i1 %cmp86, double %sub24, double %add26
|
||||
%mul91 = fmul double %highlights, %cond90
|
||||
%add94 = fadd double undef, %mul91
|
||||
ret double %add94
|
||||
}
|
||||
Reference in new issue
Block a user