[all-commits] [llvm/llvm-project] 99dc39: [InstCombine] Make fptrunc combine use intersectio...

John Brawn via All-commits all-commits at lists.llvm.org
Fri Dec 6 03:40:52 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 99dc3967595c472b6edbe789a1346b0350294567
      https://github.com/llvm/llvm-project/commit/99dc3967595c472b6edbe789a1346b0350294567
  Author: John Brawn <john.brawn at arm.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/test/Transforms/InstCombine/fpcast.ll
    M llvm/test/Transforms/InstCombine/fptrunc.ll

  Log Message:
  -----------
  [InstCombine] Make fptrunc combine use intersection of fast math flags (#118808)

These combines involve swapping the fptrunc with its operand, and using
the intersection of fast math flags is the safest option as e.g. if we
have (fptrunc (fneg ninf x)) then (fneg ninf (fptrunc x)) will not be
correct as if x is a not within the range of the destination type the
result of (fptrunc x) will be inf.



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