diff options
author | Longsheng Mou <longshengmou@gmail.com> | 2025-07-24 22:48:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-24 22:48:31 +0800 |
commit | c2c881fcc85e0c2d7a050b0199d4dadf8f556b9e (patch) | |
tree | 2467998895f7d90b5c1b734d2825ec4a39c8ad87 /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | f45e6a2834b4e7a9128b93702821a4ae944ed57b (diff) | |
download | llvm-c2c881fcc85e0c2d7a050b0199d4dadf8f556b9e.zip llvm-c2c881fcc85e0c2d7a050b0199d4dadf8f556b9e.tar.gz llvm-c2c881fcc85e0c2d7a050b0199d4dadf8f556b9e.tar.bz2 |
[mlir][tosa] Fix integer-to-boolean cast folder (#150370)
According to the TOSA spec, casting to boolean should produce true if
the input is non-zero, and false otherwise — i.e., `out = (in != 0) ?
true : false`. Previous behavior incorrectly relied on truncation, which
could yield incorrect results for non-zero values whose least
significant bit is zero. Fixes #150302.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions