[llvm] [X86][SelectionDAG] - Add support for llvm.canonicalize intrinsic (PR #106370)

YunQiang Su via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 02:49:29 PDT 2024


================
@@ -0,0 +1,1000 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --default-march x86_64-unknown-linux-gnu --version 5
+; RUN: llc -mattr=sse -mtriple=x86_64 < %s | FileCheck %s -check-prefix=SSE
+; RUN: llc -mattr=sse2 -mtriple=x86_64 < %s | FileCheck %s -check-prefix=SSE2
+; RUN: llc -mattr=+avx -mtriple=x86_64 < %s | FileCheck %s -check-prefix=AVX
+; RUN: llc -mattr=+avx2 -mtriple=x86_64 < %s | FileCheck %s -check-prefix=AVX2
+; RUN: llc -mattr=+avx512f -mtriple=x86_64 < %s | FileCheck %s -check-prefix=AVX512F
+; RUN: llc -mattr=+avx512bw -mtriple=x86_64 < %s | FileCheck %s -check-prefix=AVX512BW
+
+
+define float @canon_fp32_varargsf32(float %a) {
+; SSE-LABEL: canon_fp32_varargsf32:
----------------
wzssyqa wrote:

Sorry that I am not familiar with X86.
One use case of  canonicalize is to quiet an sNaN.
Will this work for that case?

https://github.com/llvm/llvm-project/pull/106370


More information about the llvm-commits mailing list