Issue 179972
Summary InstCombine does not check contract flag on all instructions in cos * tan -> sin combine
Labels llvm:instcombine, floating-point
Assignees
Reporter arsenm
    This combine has a viral interpretation of contract which is incorrect: https://godbolt.org/z/YWshG18Ge
```
; RUN: opt -S -p=instcombine %s
define float @missing_contract_cos_mul_tan(float %x) {
  %tan = call float @llvm.tan.f32(float %x)
  %cos = call float @llvm.cos.f32(float %x)
  %mul = fmul contract float %tan, %cos
  ret float %mul
}
```

This should require contract on both the tan and cos calls to perform the contraction.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to