[all-commits] [llvm/llvm-project] 799322: [SDAG] remove FP-to-int cast attribute check in fo...

RotateRight via All-commits all-commits at lists.llvm.org
Fri Dec 17 13:01:50 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 79932211f9126b56bf6cf3ae82c7581d55d91ae2
      https://github.com/llvm/llvm-project/commit/79932211f9126b56bf6cf3ae82c7581d55d91ae2
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-12-17 (Fri, 17 Dec 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/ftrunc.ll

  Log Message:
  -----------
  [SDAG] remove FP-to-int cast attribute check in fold to FTRUNC

We were using a function attribute to indicate a non-standard FP mode,
but now we can use intrinsics for that job as shown in the new tests.
Presumably the x86 asm could be improved for that IR with intrinsics,
but I have not worked out exactly how to do that. Note that the
transform to FTRUNC still requires a hacky check for "nsz" (because
FMF are not applied to FP casts).

This is a cleanup based on the clang change in D115804 / 8c7f2a4f87192 .
This is effectively a revert of 5a90285bd98d2 + D46237 .

Differential Revision: https://reviews.llvm.org/D115885




More information about the All-commits mailing list