[all-commits] [llvm/llvm-project] cab09e: [InstCombine] Propagate FMF from fptrunc when fold...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Sun Jun 15 21:08:09 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cab09e76e0c4c95f44cf90bf2bf7a6eaa15b14b2
https://github.com/llvm/llvm-project/commit/cab09e76e0c4c95f44cf90bf2bf7a6eaa15b14b2
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2025-06-16 (Mon, 16 Jun 2025)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
M llvm/test/Transforms/InstCombine/double-float-shrink-2.ll
M llvm/test/Transforms/InstCombine/fabs.ll
M llvm/test/Transforms/InstCombine/fpcast.ll
Log Message:
-----------
[InstCombine] Propagate FMF from fptrunc when folding `fptrunc fabs(X) -> fabs(fptrunc X)` (#143352)
Alive2: https://alive2.llvm.org/ce/z/DWV3G3
fptrunc yields infinity when the input cannot fit in the target type. So
ninf should be propagated from fptrunc. For other intrinsics, the
previous check ensures that the result is never an infinity:
https://github.com/llvm/llvm-project/blob/5d3899d293e902124c3602b466031b6b799fb123/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp#L1910-L1917
Closes https://github.com/llvm/llvm-project/issues/143122.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list