llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: None (paperchalice)

<details>
<summary>Changes</summary>

One of global options in `TargetMachine::resetTargetOptions`, now all backends 
no longer support it, remote it.

---

Patch is 23.82 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/180083.diff


23 Files Affected:

- (modified) clang/lib/CodeGen/BackendUtil.cpp (-1) 
- (modified) clang/lib/CodeGen/CGCall.cpp (-2) 
- (modified) clang/lib/CodeGen/CodeGenFunction.cpp (-1) 
- (modified) clang/test/CodeGen/fp-function-attrs.cpp (+2-2) 
- (modified) clang/test/CodeGenOpenCL/relaxed-fpmath.cl (-6) 
- (modified) flang/include/flang/Optimizer/Transforms/Passes.td (+1-1) 
- (modified) flang/include/flang/Tools/CrossToolHelpers.h (+1-1) 
- (modified) flang/lib/Optimizer/Transforms/FunctionAttr.cpp (-4) 
- (modified) flang/test/Driver/func-attr-fast-math.f90 (+2-2) 
- (modified) llvm/include/llvm/CodeGen/CommandFlags.h (-2) 
- (modified) llvm/include/llvm/IR/Attributes.td (-2) 
- (modified) llvm/include/llvm/Target/TargetOptions.h (+2-8) 
- (modified) llvm/lib/CodeGen/CommandFlags.cpp (-9) 
- (modified) llvm/lib/Target/TargetMachine.cpp (-1) 
- (modified) 
llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp (-1) 
- (modified) llvm/test/CodeGen/AMDGPU/inline-attr.ll (+5-6) 
- (modified) 
llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll 
(+3-4) 
- (modified) llvm/test/Transforms/Inline/attributes.ll (-42) 
- (modified) mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td (-1) 
- (modified) mlir/lib/Target/LLVMIR/ModuleImport.cpp (-5) 
- (modified) mlir/lib/Target/LLVMIR/ModuleTranslation.cpp (-3) 
- (modified) mlir/test/Target/LLVMIR/Import/function-attributes.ll (-12) 
- (modified) mlir/test/Target/LLVMIR/fp-math-function-attributes.mlir (-18) 


``````````diff
diff --git a/clang/lib/CodeGen/BackendUtil.cpp 
b/clang/lib/CodeGen/BackendUtil.cpp
index b286ff359ec40..94257fb96fc7f 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -414,7 +414,6 @@ static bool initTargetOptions(const CompilerInstance &CI,
   if (CodeGenOpts.hasWasmExceptions())
     Options.ExceptionModel = llvm::ExceptionHandling::Wasm;
 
-  Options.NoInfsFPMath = LangOpts.NoHonorInfs;
   Options.NoNaNsFPMath = LangOpts.NoHonorNaNs;
   Options.NoZerosInBSS = CodeGenOpts.NoZeroInitializedInBSS;
 
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index efb5ade668920..76535cff60d66 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -2009,8 +2009,6 @@ static void getTrivialDefaultFunctionAttributes(
 
     // TODO: Are these all needed?
     // unsafe/inf/nan/nsz are handled by instruction-level FastMathFlags.
-    if (LangOpts.NoHonorInfs)
-      FuncAttrs.addAttribute("no-infs-fp-math", "true");
     if (LangOpts.NoHonorNaNs)
       FuncAttrs.addAttribute("no-nans-fp-math", "true");
     if (CodeGenOpts.SoftFloat)
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp 
b/clang/lib/CodeGen/CodeGenFunction.cpp
index aa6f2ebaccd79..2d3507447804a 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -178,7 +178,6 @@ void 
CodeGenFunction::CGFPOptionsRAII::ConstructorHelper(FPOptions FPFeatures) {
     if (OldValue != NewValue)
       CGF.CurFn->addFnAttr(Name, llvm::toStringRef(NewValue));
   };
-  mergeFnAttrValue("no-infs-fp-math", FPFeatures.getNoHonorInfs());
   mergeFnAttrValue("no-nans-fp-math", FPFeatures.getNoHonorNaNs());
   mergeFnAttrValue("no-signed-zeros-fp-math", FPFeatures.getNoSignedZero());
 }
diff --git a/clang/test/CodeGen/fp-function-attrs.cpp 
b/clang/test/CodeGen/fp-function-attrs.cpp
index 3775bd5452d78..dc1ca7ef00ea9 100644
--- a/clang/test/CodeGen/fp-function-attrs.cpp
+++ b/clang/test/CodeGen/fp-function-attrs.cpp
@@ -53,5 +53,5 @@ float test_contract_on_pragma(float a, float b, float c) {
 // CHECK: fmul fast float {{%.+}}, {{%.+}}
 // CHECK: fadd reassoc nnan ninf nsz arcp afn float {{%.+}}, {{%.+}}
 
-// CHECK: attributes [[FAST_ATTRS]] = { {{.*}}"no-infs-fp-math"="true" 
{{.*}}"no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true"{{.*}} }
-// CHECK: attributes [[PRECISE_ATTRS]] = { {{.*}}"no-infs-fp-math"="false" 
{{.*}}"no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false"{{.*}} }
+// CHECK: attributes [[FAST_ATTRS]] = { {{.*}}"no-nans-fp-math"="true" 
"no-signed-zeros-fp-math"="true"{{.*}} }
+// CHECK: attributes [[PRECISE_ATTRS]] = { {{.*}}"no-nans-fp-math"="false" 
"no-signed-zeros-fp-math"="false"{{.*}} }
diff --git a/clang/test/CodeGenOpenCL/relaxed-fpmath.cl 
b/clang/test/CodeGenOpenCL/relaxed-fpmath.cl
index c113d23c3028d..126947ba8fd7f 100644
--- a/clang/test/CodeGenOpenCL/relaxed-fpmath.cl
+++ b/clang/test/CodeGenOpenCL/relaxed-fpmath.cl
@@ -30,32 +30,26 @@ float spscalardiv(float a, float b) {
 // CHECK: attributes
 
 // NORMAL-NOT: "less-precise-fpmad"
-// NORMAL-NOT: "no-infs-fp-math"
 // NORMAL-NOT: "no-nans-fp-math"
 // NORMAL-NOT: "no-signed-zeros-fp-math"
 
 // FAST: "less-precise-fpmad"="true"
-// FAST: "no-infs-fp-math"="true"
 // FAST: "no-nans-fp-math"="true"
 // FAST: "no-signed-zeros-fp-math"="true"
 
 // FINITE-NOT: "less-precise-fpmad"
-// FINITE: "no-infs-fp-math"="true"
 // FINITE: "no-nans-fp-math"="true"
 // FINITE-NOT: "no-signed-zeros-fp-math"
 
 // UNSAFE: "less-precise-fpmad"="true"
-// UNSAFE-NOT: "no-infs-fp-math"
 // UNSAFE-NOT: "no-nans-fp-math"
 // UNSAFE: "no-signed-zeros-fp-math"="true"
 
 // MAD: "less-precise-fpmad"="true"
-// MAD-NOT: "no-infs-fp-math"
 // MAD-NOT: "no-nans-fp-math"
 // MAD-NOT: "no-signed-zeros-fp-math"
 
 // NOSIGNED-NOT: "less-precise-fpmad"
-// NOSIGNED-NOT: "no-infs-fp-math"
 // NOSIGNED-NOT: "no-nans-fp-math"
 // NOSIGNED: "no-signed-zeros-fp-math"="true"
 
diff --git a/flang/include/flang/Optimizer/Transforms/Passes.td 
b/flang/include/flang/Optimizer/Transforms/Passes.td
index c2d6526b558d2..090a1ce24fd8b 100644
--- a/flang/include/flang/Optimizer/Transforms/Passes.td
+++ b/flang/include/flang/Optimizer/Transforms/Passes.td
@@ -437,7 +437,7 @@ def FunctionAttr : Pass<"function-attr", 
"mlir::func::FuncOp"> {
               "Sets the name of the profiling function called during function "
               "exit">,
        Option<"noInfsFPMath", "no-infs-fp-math", "bool", /*default=*/"false",
-              "Set the no-infs-fp-math attribute on functions in the module.">,
+              "Set the ninf flag on instructions in the module.">,
        Option<"noNaNsFPMath", "no-nans-fp-math", "bool", /*default=*/"false",
               "Set the no-nans-fp-math attribute on functions in the module.">,
        Option<"approxFuncFPMath", "approx-func-fp-math", "bool",
diff --git a/flang/include/flang/Tools/CrossToolHelpers.h 
b/flang/include/flang/Tools/CrossToolHelpers.h
index e964882ef6dac..44fb252d2b366 100644
--- a/flang/include/flang/Tools/CrossToolHelpers.h
+++ b/flang/include/flang/Tools/CrossToolHelpers.h
@@ -123,7 +123,7 @@ struct MLIRToLLVMPassPipelineConfig : public 
FlangEPCallBacks {
       llvm::FramePointerKind::None; ///< Add frame pointer to functions.
   unsigned VScaleMin = 0; ///< SVE vector range minimum.
   unsigned VScaleMax = 0; ///< SVE vector range maximum.
-  bool NoInfsFPMath = false; ///< Set no-infs-fp-math attribute for functions.
+  bool NoInfsFPMath = false; ///< Set ninf flag for instructions.
   bool NoNaNsFPMath = false; ///< Set no-nans-fp-math attribute for functions.
   bool ApproxFuncFPMath = false; ///< Set afn flag for instructions.
   bool NoSignedZerosFPMath =
diff --git a/flang/lib/Optimizer/Transforms/FunctionAttr.cpp 
b/flang/lib/Optimizer/Transforms/FunctionAttr.cpp
index fea511cc63a37..3879a807fda2f 100644
--- a/flang/lib/Optimizer/Transforms/FunctionAttr.cpp
+++ b/flang/lib/Optimizer/Transforms/FunctionAttr.cpp
@@ -87,10 +87,6 @@ void FunctionAttrPass::runOnOperation() {
     func->setAttr(mlir::LLVM::LLVMFuncOp::getInstrumentFunctionExitAttrName(
                       llvmFuncOpName),
                   mlir::StringAttr::get(context, instrumentFunctionExit));
-  if (noInfsFPMath)
-    func->setAttr(
-        mlir::LLVM::LLVMFuncOp::getNoInfsFpMathAttrName(llvmFuncOpName),
-        mlir::BoolAttr::get(context, true));
   if (noNaNsFPMath)
     func->setAttr(
         mlir::LLVM::LLVMFuncOp::getNoNansFpMathAttrName(llvmFuncOpName),
diff --git a/flang/test/Driver/func-attr-fast-math.f90 
b/flang/test/Driver/func-attr-fast-math.f90
index 3af641ea2db26..b8f8a0e1c8a63 100644
--- a/flang/test/Driver/func-attr-fast-math.f90
+++ b/flang/test/Driver/func-attr-fast-math.f90
@@ -11,8 +11,8 @@ end subroutine func
 
 ! CHECK-OFAST-LABEL: define void @func_() local_unnamed_addr
 ! CHECK-OFAST-SAME: #[[ATTRS:[0-9]+]]
-! CHECK-OFAST: attributes #[[ATTRS]] = { {{.*}}"no-infs-fp-math"="true" 
{{.*}}"no-nans-fp-math"="true" {{.*}}"no-signed-zeros-fp-math"="true"{{.*}} }
+! CHECK-OFAST: attributes #[[ATTRS]] = { {{.*}}"no-nans-fp-math"="true" 
{{.*}}"no-signed-zeros-fp-math"="true"{{.*}} }
 
 ! CHECK-FFAST-MATH-LABEL: define void @func_() local_unnamed_addr
 ! CHECK-FFAST-MATH-SAME: #[[ATTRS:[0-9]+]]
-! CHECK-FFAST-MATH: attributes #[[ATTRS]] = { {{.*}}"no-infs-fp-math"="true" 
{{.*}}"no-nans-fp-math"="true" {{.*}}"no-signed-zeros-fp-math"="true"{{.*}} }
+! CHECK-FFAST-MATH: attributes #[[ATTRS]] = { {{.*}}"no-nans-fp-math"="true" 
{{.*}}"no-signed-zeros-fp-math"="true"{{.*}} }
diff --git a/llvm/include/llvm/CodeGen/CommandFlags.h 
b/llvm/include/llvm/CodeGen/CommandFlags.h
index 6a907b64542ae..c83bce7771878 100644
--- a/llvm/include/llvm/CodeGen/CommandFlags.h
+++ b/llvm/include/llvm/CodeGen/CommandFlags.h
@@ -58,8 +58,6 @@ LLVM_ABI CodeGenFileType getFileType();
 
 LLVM_ABI FramePointerKind getFramePointerUsage();
 
-LLVM_ABI bool getEnableNoInfsFPMath();
-
 LLVM_ABI bool getEnableNoNaNsFPMath();
 
 LLVM_ABI bool getEnableNoSignedZerosFPMath();
diff --git a/llvm/include/llvm/IR/Attributes.td 
b/llvm/include/llvm/IR/Attributes.td
index 5220b4768a39f..7c5457459f243 100644
--- a/llvm/include/llvm/IR/Attributes.td
+++ b/llvm/include/llvm/IR/Attributes.td
@@ -416,7 +416,6 @@ def AllowDirectAccessInHotPatchFunction
 
 /// Target-independent string attributes.
 def LessPreciseFPMAD : StrBoolAttr<"less-precise-fpmad">;
-def NoInfsFPMath : StrBoolAttr<"no-infs-fp-math">;
 def NoNansFPMath : StrBoolAttr<"no-nans-fp-math">;
 def NoSignedZerosFPMath : StrBoolAttr<"no-signed-zeros-fp-math">;
 def NoJumpTables : StrBoolAttr<"no-jump-tables">;
@@ -476,7 +475,6 @@ class MergeRule<string F> {
 }
 
 def : MergeRule<"setAND<LessPreciseFPMADAttr>">;
-def : MergeRule<"setAND<NoInfsFPMathAttr>">;
 def : MergeRule<"setAND<NoNansFPMathAttr>">;
 def : MergeRule<"setAND<NoSignedZerosFPMathAttr>">;
 def : MergeRule<"setOR<NoImplicitFloatAttr>">;
diff --git a/llvm/include/llvm/Target/TargetOptions.h 
b/llvm/include/llvm/Target/TargetOptions.h
index a9b86626cf598..e38ec301ff091 100644
--- a/llvm/include/llvm/Target/TargetOptions.h
+++ b/llvm/include/llvm/Target/TargetOptions.h
@@ -119,8 +119,8 @@ enum CodeObjectVersionKind {
 class TargetOptions {
 public:
   TargetOptions()
-      : NoInfsFPMath(false), NoNaNsFPMath(false), NoTrappingFPMath(true),
-        NoSignedZerosFPMath(false), EnableAIXExtendedAltivecABI(false),
+      : NoNaNsFPMath(false), NoTrappingFPMath(true), 
NoSignedZerosFPMath(false),
+        EnableAIXExtendedAltivecABI(false),
         HonorSignDependentRoundingFPMathOption(false), NoZerosInBSS(false),
         GuaranteedTailCallOpt(false), StackSymbolOrdering(true),
         EnableFastISel(false), EnableGlobalISel(false), UseInitArray(false),
@@ -155,12 +155,6 @@ class TargetOptions {
   /// MCAsmInfo::BinutilsVersion.
   std::pair<int, int> BinutilsVersion{0, 0};
 
-  /// NoInfsFPMath - This flag is enabled when the
-  /// -enable-no-infs-fp-math flag is specified on the command line. When
-  /// this flag is off (the default), the code generator is not allowed to
-  /// assume the FP arithmetic arguments and results are never +-Infs.
-  unsigned NoInfsFPMath : 1;
-
   /// NoNaNsFPMath - This flag is enabled when the
   /// -enable-no-nans-fp-math flag is specified on the command line. When
   /// this flag is off (the default), the code generator is not allowed to
diff --git a/llvm/lib/CodeGen/CommandFlags.cpp 
b/llvm/lib/CodeGen/CommandFlags.cpp
index e2e5e2263062f..24f74dbd28b61 100644
--- a/llvm/lib/CodeGen/CommandFlags.cpp
+++ b/llvm/lib/CodeGen/CommandFlags.cpp
@@ -74,7 +74,6 @@ CGOPT_EXP(uint64_t, LargeDataThreshold)
 CGOPT(ExceptionHandling, ExceptionModel)
 CGOPT_EXP(CodeGenFileType, FileType)
 CGOPT(FramePointerKind, FramePointerUsage)
-CGOPT(bool, EnableNoInfsFPMath)
 CGOPT(bool, EnableNoNaNsFPMath)
 CGOPT(bool, EnableNoSignedZerosFPMath)
 CGOPT(bool, EnableNoTrappingFPMath)
@@ -233,12 +232,6 @@ codegen::RegisterCodeGenFlags::RegisterCodeGenFlags() {
                      "Enable frame pointer elimination")));
   CGBINDOPT(FramePointerUsage);
 
-  static cl::opt<bool> EnableNoInfsFPMath(
-      "enable-no-infs-fp-math",
-      cl::desc("Enable FP math optimizations that assume no +-Infs"),
-      cl::init(false));
-  CGBINDOPT(EnableNoInfsFPMath);
-
   static cl::opt<bool> EnableNoNaNsFPMath(
       "enable-no-nans-fp-math",
       cl::desc("Enable FP math optimizations that assume no NaNs"),
@@ -596,7 +589,6 @@ TargetOptions
 codegen::InitTargetOptionsFromCodeGenFlags(const Triple &TheTriple) {
   TargetOptions Options;
   Options.AllowFPOpFusion = getFuseFPOps();
-  Options.NoInfsFPMath = getEnableNoInfsFPMath();
   Options.NoNaNsFPMath = getEnableNoNaNsFPMath();
   Options.NoSignedZerosFPMath = getEnableNoSignedZerosFPMath();
   Options.NoTrappingFPMath = getEnableNoTrappingFPMath();
@@ -747,7 +739,6 @@ void codegen::setFunctionAttributes(StringRef CPU, 
StringRef Features,
   if (getStackRealign())
     NewAttrs.addAttribute("stackrealign");
 
-  HANDLE_BOOL_ATTR(EnableNoInfsFPMathView, "no-infs-fp-math");
   HANDLE_BOOL_ATTR(EnableNoNaNsFPMathView, "no-nans-fp-math");
   HANDLE_BOOL_ATTR(EnableNoSignedZerosFPMathView, "no-signed-zeros-fp-math");
 
diff --git a/llvm/lib/Target/TargetMachine.cpp 
b/llvm/lib/Target/TargetMachine.cpp
index f8f13a042fec0..3494637237c69 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -158,7 +158,6 @@ void TargetMachine::resetTargetOptions(const Function &F) 
const {
     Options.X = F.getFnAttribute(Y).getValueAsBool();     \
   } while (0)
 
-  RESET_OPTION(NoInfsFPMath, "no-infs-fp-math");
   RESET_OPTION(NoNaNsFPMath, "no-nans-fp-math");
   RESET_OPTION(NoSignedZerosFPMath, "no-signed-zeros-fp-math");
 }
diff --git 
a/llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp 
b/llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp
index 66d570b3f831e..f9ef67923ed48 100644
--- a/llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp
@@ -2020,7 +2020,6 @@ static void moveFastMathFlags(Function &F,
     F.removeFnAttr(attr);                                                      
\
     FMF.set##setter();                                                         
\
   }
-  MOVE_FLAG("no-infs-fp-math", NoInfs)
   MOVE_FLAG("no-nans-fp-math", NoNaNs)
   MOVE_FLAG("no-signed-zeros-fp-math", NoSignedZeros)
 #undef MOVE_FLAG
diff --git a/llvm/test/CodeGen/AMDGPU/inline-attr.ll 
b/llvm/test/CodeGen/AMDGPU/inline-attr.ll
index c33b3344fd51c..6400c3860ad88 100644
--- a/llvm/test/CodeGen/AMDGPU/inline-attr.ll
+++ b/llvm/test/CodeGen/AMDGPU/inline-attr.ll
@@ -1,7 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 
UTC_ARGS: --check-globals all --version 5
 ; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -O3 %s  | FileCheck 
--check-prefixes=GCN,UNSAFE %s
 ; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -O3 -enable-no-nans-fp-math %s | 
FileCheck --check-prefixes=GCN,NONANS %s
-; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -O3 -enable-no-infs-fp-math %s | 
FileCheck --check-prefixes=GCN,NOINFS %s
 
 declare void @extern() #0
 
@@ -37,17 +36,17 @@ entry:
 }
 
 attributes #0 = { nounwind "uniform-work-group-size"="false"}
-attributes #1 = { nounwind "less-precise-fpmad"="true" 
"no-infs-fp-math"="true" "no-nans-fp-math"="true" }
+attributes #1 = { nounwind "less-precise-fpmad"="true" 
"no-nans-fp-math"="true" }
 
 ;.
 ; UNSAFE: attributes #[[ATTR0]] = { nounwind "uniform-work-group-size"="false" 
}
-; UNSAFE: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" 
"no-infs-fp-math"="false" "no-nans-fp-math"="false" 
"uniform-work-group-size"="false" }
+; UNSAFE: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" 
"no-nans-fp-math"="false" "uniform-work-group-size"="false" }
 ;.
 ; NONANS: attributes #[[ATTR0]] = { nounwind "no-nans-fp-math"="true" 
"uniform-work-group-size"="false" }
-; NONANS: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" 
"no-infs-fp-math"="false" "no-nans-fp-math"="true" 
"uniform-work-group-size"="false" }
+; NONANS: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" 
"no-nans-fp-math"="true" "uniform-work-group-size"="false" }
 ;.
-; NOINFS: attributes #[[ATTR0]] = { nounwind "no-infs-fp-math"="true" 
"uniform-work-group-size"="false" }
-; NOINFS: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" 
"no-infs-fp-math"="true" "no-nans-fp-math"="false" 
"uniform-work-group-size"="false" }
+; NOINFS: attributes #[[ATTR0]] = { nounwind "uniform-work-group-size"="false" 
}
+; NOINFS: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" 
"no-nans-fp-math"="false" "uniform-work-group-size"="false" }
 ;.
 ; UNSAFE: [[META0]] = !{}
 ;.
diff --git 
a/llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll
 
b/llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll
index 15ce3e3c440fe..68a640ef8d3df 100644
--- 
a/llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll
+++ 
b/llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll
@@ -100,8 +100,7 @@ entry:
   ret void
 }
 
-attributes #0 = { "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" 
"less-precise-fpmad"="true"
-"no-infs-fp-math"="true"}
+attributes #0 = { "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" 
"less-precise-fpmad"="true" }
 
 ; CHECK: define internal void @outlined_ir_func_0(ptr [[ARG0:%.*]], ptr 
[[ARG1:%.*]], ptr [[ARG2:%.*]]) [[ATTR1:#[0-9]+]] {
 ; CHECK: entry_to_outline:
@@ -122,5 +121,5 @@ attributes #0 = { "no-nans-fp-math"="true" 
"no-signed-zeros-fp-math"="true" "les
 ; CHECK-NEXT:    [[CL:%.*]] = load i32, ptr [[ARG2]], align 4
 
 
-; CHECK: attributes [[ATTR1]] =   { minsize optsize 
"less-precise-fpmad"="false" "no-infs-fp-math"="false" 
"no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" }
-; CHECK: attributes [[ATTR]] = { minsize optsize "less-precise-fpmad"="true" 
"no-infs-fp-math"="true" "no-nans-fp-math"="true" 
"no-signed-zeros-fp-math"="true" }
+; CHECK: attributes [[ATTR1]] =   { minsize optsize 
"less-precise-fpmad"="false" "no-nans-fp-math"="false" 
"no-signed-zeros-fp-math"="false" }
+; CHECK: attributes [[ATTR]] = { minsize optsize "less-precise-fpmad"="true" 
"no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" }
diff --git a/llvm/test/Transforms/Inline/attributes.ll 
b/llvm/test/Transforms/Inline/attributes.ll
index 9582f416ce4f6..762e3bc9a34a4 100644
--- a/llvm/test/Transforms/Inline/attributes.ll
+++ b/llvm/test/Transforms/Inline/attributes.ll
@@ -480,46 +480,6 @@ define i32 @test_null-pointer-is-valid2(i32 %i) 
null_pointer_is_valid {
 ; CHECK-NEXT: ret i32
 }
 
-define i32 @no-infs-fp-math_callee0(i32 %i) "no-infs-fp-math"="false" {
-  ret i32 %i
-; CHECK: @no-infs-fp-math_callee0(i32 %i) [[NO_INFS_FPMATH_FALSE:#[0-9]+]] {
-; CHECK-NEXT: ret i32
-}
-
-define i32 @no-infs-fp-math_callee1(i32 %i) "no-infs-fp-math"="true" {
-  ret i32 %i
-; CHECK: @no-infs-fp-math_callee1(i32 %i) [[NO_INFS_FPMATH_TRUE:#[0-9]+]] {
-; CHECK-NEXT: ret i32
-}
-
-define i32 @test_no-infs-fp-math0(i32 %i) "no-infs-fp-math"="false" {
-  %1 = call i32 @no-infs-fp-math_callee0(i32 %i)
-  ret i32 %1
-; CHECK: @test_no-infs-fp-math0(i32 %i) [[NO_INFS_FPMATH_FALSE]] {
-; CHECK-NEXT: ret i32
-}
-
-define i32 @test_no-infs-fp-math1(i32 %i) "no-infs-fp-math"="false" {
-  %1 = call i32 @no-infs-fp-math_callee1(i32 %i)
-  ret i32 %1
-; CHECK: @test_no-infs-fp-math1(i32 %i) [[NO_INFS_FPMATH_FALSE]] {
-; CHECK-NEXT: ret i32
-}
-
-define i32 @test_no-infs-fp-math2(i32 %i) "no-infs-fp-math"="true" {
-  %1 = call i32 @no-infs-fp-math_callee0(i32 %i)
-  ret i32 %1
-; CHECK: @test_no-infs-fp-math2(i32 %i) [[NO_INFS_FPMATH_FALSE]] {
-; CHECK-NEXT: ret i32
-}
-
-define i32 @test_no-infs-fp-math3(i32 %i) "no-infs-fp-math"="true" {
-  %1 = call i32 @no-infs-fp-math_callee1(i32 %i)
-  ret i32 %1
-; CHECK: @test_no-infs-fp-math3(i32 %i) [[NO_INFS_FPMATH_TRUE]] {
-; CHECK-NEXT: ret i32
-}
-
 define i32 @no-nans-fp-math_callee0(i32 %i) "no-nans-fp-math"="false" {
   ret i32 %i
 ; CHECK: @no-nans-fp-math_callee0(i32 %i) [[NO_NANS_FPMATH_FALSE:#[0-9]+]] {
@@ -646,8 +606,6 @@ define i32 @loader_replaceable_caller() {
 ; CHECK: attributes [[NOIMPLICITFLOAT]] = { noimplicitfloat }
 ; CHECK: attributes [[NOUSEJUMPTABLES]] = { "no-jump-tables"="true" }
 ; CHECK: attributes [[NULLPOINTERISVALID]] = { null_pointer_is_valid }
-; CHECK: attributes [[NO_INFS_FPMATH_FALSE]] = { "no-infs-fp-math"="false" }
-; CHECK: attributes [[NO_INFS_FPMATH_TRUE]] = { "no-infs-fp-math"="true" }
 ; CHECK: attributes [[NO_NANS_FPMATH_FALSE]] = { "no-nans-fp-math"="false" }
 ; CHECK: attributes [[NO_NANS_FPMATH_TRUE]] = { "no-nans-fp-math"="true" }
 ; CHECK: attributes [[NO_SIGNED_ZEROS_FPMATH_FALSE]] = { 
"no-signed-zeros-fp-math"="false" }
diff --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td 
b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
index c57d0a15c404a..6323c0cc6a60a 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
@@ -1985,7 +1985,6 @@ def LLVM_LLVMFuncOp : LLVM_Op<"func", [
     OptionalAttr<StrAttr>:$reciprocal_estimates,
     OptionalAttr<StrAttr>:$prefer_vector_width,
     OptionalAttr<LLVM_TargetFeaturesAttr>:$target_features,
-    OptionalAttr<BoolAttr>:$no_infs_fp_math,
     OptionalAttr<BoolAttr>:$no_nans_fp_math,
    ...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/180083
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [clang] [... via cfe-commits
    • [cla... via cfe-commits
    • [cla... via cfe-commits
    • [cla... via cfe-commits
    • [cla... via cfe-commits
    • [cla... Valentin Clement バレンタイン クレメン via cfe-commits
    • [cla... via cfe-commits
    • [cla... Matt Arsenault via cfe-commits
    • [cla... via cfe-commits
    • [cla... LLVM Continuous Integration via cfe-commits
    • [cla... LLVM Continuous Integration via cfe-commits

Reply via email to