Skip to content

[InstSimplify] FP-related miscompile #58046

Closed
llvm/llvm-project-release-prs
#174
@nikic

Description

@nikic

From rust-lang/rust#102402:

define i1 @src(i64 %0) {
  %i2 = uitofp i64 %0 to float
  %i3 = fpext float %i2 to double
  %i4 = fmul double -0.000000e+00, %i3
  %i5 = fdiv double 1.000000e+00, %i4
  %i6 = fcmp oeq double %i5, 0xFFF0000000000000
  ret i1 %i6
}
; RUN: opt -S -instsimplify
define i1 @src(i64 %0) {
  ret i1 false
}

Counter-proof: https://alive2.llvm.org/ce/z/6Rx_Cb

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions