pengfei updated this revision to Diff 484521. pengfei marked an inline comment as done. pengfei added a comment.
Use FastMathFlagGuard instead, thanks @foad! In D140467#4010296 <https://reviews.llvm.org/D140467#4010296>, @arsenm wrote: > Needs tests. I couldn’t find any for the base builtins either I don't think so. We have tested their intrinsic wrappers, e.g., https://github.com/llvm/llvm-project/blob/main/clang/test/CodeGen/X86/avx512fp16-builtins.c#L4451 We don't need to test those target specific builtins. They are neither guaranteed to be cross compiler compatible nor release by release. Besides, we have thousands of intrinsics in X86. Adding their builtin tests have no any benefits and increase the time in lit tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140467/new/ https://reviews.llvm.org/D140467 Files: clang/lib/CodeGen/CGBuiltin.cpp Index: clang/lib/CodeGen/CGBuiltin.cpp =================================================================== --- clang/lib/CodeGen/CGBuiltin.cpp +++ clang/lib/CodeGen/CGBuiltin.cpp @@ -13113,6 +13113,8 @@ return Builder.CreateBitCast(Sext, FPVecTy); }; + IRBuilder<>::FastMathFlagGuard FMFGuard(Builder); + switch (BuiltinID) { default: return nullptr; case X86::BI_mm_prefetch: {
Index: clang/lib/CodeGen/CGBuiltin.cpp =================================================================== --- clang/lib/CodeGen/CGBuiltin.cpp +++ clang/lib/CodeGen/CGBuiltin.cpp @@ -13113,6 +13113,8 @@ return Builder.CreateBitCast(Sext, FPVecTy); }; + IRBuilder<>::FastMathFlagGuard FMFGuard(Builder); + switch (BuiltinID) { default: return nullptr; case X86::BI_mm_prefetch: {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits