[all-commits] [llvm/llvm-project] 63f083: [clang] Fix missing contract flag in sqrt intrinsic

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Thu Aug 24 16:16:15 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 63f0833ec4beb7d6bc63759ad8b336ad6dce0f93
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2023-08-24 (Thu, 24 Aug 2023)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGen/fp-contract-fast-pragma.cpp

  Log Message:
  [clang] Fix missing contract flag in sqrt intrinsic

The fp options specified through pragma are already encoded in Expr.

This patch takes the same approach used by clang codegen to emit
fastmath flags for fadd insts, basically use RAII to set the
current fastmath flags in IRBuilder, which is then used to emit
sqrt intrinsic.

Fixes: https://github.com/llvm/llvm-project/issues/64653

More information about the All-commits mailing list