[llvm] [llvm] Fix fabs simplification (PR #152825)

Oliver Hunt via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 9 00:35:48 PDT 2025


ojhunt wrote:

> Given `std::optional<bool>Res;`, `Res == false`, `Res == std::optional<bool>(false)`, and `Res && *Res == false` all mean the same thing.

Is that the conversion path that is actually happening? (and yes with more testing I found the actual issue is that in my first pass I was just disabling the optimization) I'm closing this PR for now, although independent of fixing anything I think this code would be clearer with the `* + ==` version.


https://github.com/llvm/llvm-project/pull/152825


More information about the llvm-commits mailing list