aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2024-02-07 23:27:41 +0800
committerGitHub <noreply@github.com>2024-02-07 23:27:41 +0800
commit7a71ac2b00cd6ec06c113f8813f085d5ed346ad9 (patch)
treef3d4c3ddddfde4a0022cb62565563ae6f4ed7871 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentd4a2c7f95297d1865a457955dcf7b679dabb5e0e (diff)
downloadllvm-7a71ac2b00cd6ec06c113f8813f085d5ed346ad9.zip
llvm-7a71ac2b00cd6ec06c113f8813f085d5ed346ad9.tar.gz
llvm-7a71ac2b00cd6ec06c113f8813f085d5ed346ad9.tar.bz2
[InstCombine] Canonicalize fcmp with inf (#80986)
This patch canonicalizes floating-point comparisons with inf: ``` fcmp olt X, +inf -> fcmp one X, +inf fcmp ole X, +inf -> fcmp ord X, 0 fcmp ogt X, +inf -> false fcmp oge X, +inf -> fcmp oeq X, +inf fcmp ult X, +inf -> fcmp une X, +inf fcmp ule X, +inf -> true fcmp ugt X, +inf -> fcmp uno X, 0 fcmp uge X, +inf -> fcmp ueq X, +inf fcmp olt X, -inf -> false fcmp ole X, -inf -> fcmp oeq X, -inf fcmp ogt X, -inf -> fcmp one X, -inf fcmp oge X, -inf -> fcmp ord X, 0 fcmp ult X, -inf -> fcmp uno X, 0 fcmp ule X, -inf -> fcmp ueq X, -inf fcmp ugt X, -inf -> fcmp une X, -inf fcmp uge X, -inf -> true ``` Alive2: https://alive2.llvm.org/ce/z/FRqqDg The motivation of this patch is to fix the regression found in https://github.com/dtcxzyw/llvm-opt-benchmark/pull/199#discussion_r1480974120.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions