llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-backend-mips Author: None (paperchalice) <details> <summary>Changes</summary> Now all `NoNaNsFPMath` uses have been removed, remove this attribute. --- Patch is 46.73 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/186285.diff 38 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/amdgpu-ieee.cl (+2-2) - (modified) clang/test/CodeGenOpenCL/relaxed-fpmath.cl (-6) - (modified) clang/test/OpenMP/amdgcn-attributes.cpp (+2-2) - (modified) flang/include/flang/Optimizer/Transforms/Passes.td (+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 (+1-7) - (modified) llvm/lib/CodeGen/CommandFlags.cpp (-9) - (modified) llvm/lib/Target/TargetMachine.cpp (-1) - (modified) llvm/test/Analysis/CostModel/AArch64/sve-arith-fp.ll (+2-2) - (modified) llvm/test/Analysis/CostModel/X86/arith-fma.ll (+5-5) - (modified) llvm/test/Analysis/CostModel/X86/arith-fp.ll (+11-11) - (modified) llvm/test/Analysis/CostModel/X86/fround.ll (+9-9) - (modified) llvm/test/Analysis/CostModel/X86/powi.ll (+4-4) - (modified) llvm/test/CodeGen/AArch64/arm64-fmax.ll (+1-1) - (modified) llvm/test/CodeGen/AMDGPU/inline-attr.ll (+6-6) - (modified) llvm/test/CodeGen/ARM/fp16-vminmaxnm.ll (+2-2) - (modified) llvm/test/CodeGen/ARM/vminmaxnm.ll (+1-1) - (modified) llvm/test/CodeGen/Mips/fmadd1.ll (+3-3) - (modified) llvm/test/CodeGen/Mips/fneg.ll (+3-3) - (modified) llvm/test/CodeGen/Mips/nmadd.ll (+11-11) - (modified) llvm/test/CodeGen/PowerPC/fsel.ll (+1-1) - (modified) llvm/test/CodeGen/PowerPC/scalar-min-max-p10.ll (-1) - (modified) llvm/test/CodeGen/X86/avx512fp16-unsafe-fp-math.ll (+1-1) - (modified) llvm/test/CodeGen/X86/fabs.ll (+1-1) - (modified) llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll (+4-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 754bcc5d12b9b..4b4eaadcf1527 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.NoNaNsFPMath = LangOpts.NoHonorNaNs; Options.NoZerosInBSS = CodeGenOpts.NoZeroInitializedInBSS; Options.BBAddrMap = CodeGenOpts.BBAddrMap; diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 6dfd0f915190a..4c0ea9ec3ea9c 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2107,8 +2107,6 @@ static void getTrivialDefaultFunctionAttributes( // TODO: Are these all needed? // unsafe/inf/nan/nsz are handled by instruction-level FastMathFlags. - if (LangOpts.NoHonorNaNs) - FuncAttrs.addAttribute("no-nans-fp-math", "true"); if (CodeGenOpts.SoftFloat) FuncAttrs.addAttribute("use-soft-float", "true"); FuncAttrs.addAttribute("stack-protector-buffer-size", diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 1dee656b5f2d0..fb0d5e450f9d6 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-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 dc1ca7ef00ea9..3d8d10b7e3fbd 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-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"{{.*}} } +// CHECK: attributes [[FAST_ATTRS]] = { {{.*}}"no-signed-zeros-fp-math"="true"{{.*}} } +// CHECK: attributes [[PRECISE_ATTRS]] = { {{.*}}"no-signed-zeros-fp-math"="false"{{.*}} } diff --git a/clang/test/CodeGenOpenCL/amdgpu-ieee.cl b/clang/test/CodeGenOpenCL/amdgpu-ieee.cl index a29ab47066958..35ddbcfb3d4bf 100644 --- a/clang/test/CodeGenOpenCL/amdgpu-ieee.cl +++ b/clang/test/CodeGenOpenCL/amdgpu-ieee.cl @@ -45,8 +45,8 @@ void fun() { } // ON-NOT: attributes [[ATTRS1]] = {{.*}} "amdgpu-ieee" -// OFF: attributes [[ATTRS1]] = {{.*}} "amdgpu-ieee"="false"{{.*}}"no-nans-fp-math"="true"{{.*}}"no-trapping-math"="true" +// OFF: attributes [[ATTRS1]] = {{.*}} "amdgpu-ieee"="false"{{.*}}"no-trapping-math"="true" // ON-NOT: attributes [[ATTRS2]] = {{.*}} "amdgpu-ieee" -// OFF: attributes [[ATTRS2]] = {{.*}} "amdgpu-ieee"="false"{{.*}}"no-nans-fp-math"="true"{{.*}}"no-trapping-math"="true" +// OFF: attributes [[ATTRS2]] = {{.*}} "amdgpu-ieee"="false"{{.*}}"no-trapping-math"="true" // DIAG: invalid argument '-mno-amdgpu-ieee' only allowed with relaxed NaN handling diff --git a/clang/test/CodeGenOpenCL/relaxed-fpmath.cl b/clang/test/CodeGenOpenCL/relaxed-fpmath.cl index 126947ba8fd7f..9228e2b680f38 100644 --- a/clang/test/CodeGenOpenCL/relaxed-fpmath.cl +++ b/clang/test/CodeGenOpenCL/relaxed-fpmath.cl @@ -30,27 +30,21 @@ float spscalardiv(float a, float b) { // CHECK: attributes // NORMAL-NOT: "less-precise-fpmad" -// NORMAL-NOT: "no-nans-fp-math" // NORMAL-NOT: "no-signed-zeros-fp-math" // FAST: "less-precise-fpmad"="true" -// FAST: "no-nans-fp-math"="true" // FAST: "no-signed-zeros-fp-math"="true" // FINITE-NOT: "less-precise-fpmad" -// FINITE: "no-nans-fp-math"="true" // FINITE-NOT: "no-signed-zeros-fp-math" // UNSAFE: "less-precise-fpmad"="true" -// UNSAFE-NOT: "no-nans-fp-math" // UNSAFE: "no-signed-zeros-fp-math"="true" // MAD: "less-precise-fpmad"="true" -// MAD-NOT: "no-nans-fp-math" // MAD-NOT: "no-signed-zeros-fp-math" // NOSIGNED-NOT: "less-precise-fpmad" -// NOSIGNED-NOT: "no-nans-fp-math" // NOSIGNED: "no-signed-zeros-fp-math"="true" #else diff --git a/clang/test/OpenMP/amdgcn-attributes.cpp b/clang/test/OpenMP/amdgcn-attributes.cpp index 6b7a86477cb4a..9f4900cc09c1f 100644 --- a/clang/test/OpenMP/amdgcn-attributes.cpp +++ b/clang/test/OpenMP/amdgcn-attributes.cpp @@ -33,8 +33,8 @@ int callable(int x) { // DEFAULT: attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,42" "kernel" "no-trapping-math"="true" "omp_target_thread_limit"="42" "stack-protector-buffer-size"="8" "uniform-work-group-size" } // CPU: attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,42" "kernel" "no-trapping-math"="true" "omp_target_thread_limit"="42" "stack-protector-buffer-size"="8" "target-cpu"="gfx900" "uniform-work-group-size" } -// NOIEEE: attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,42" "amdgpu-ieee"="false" "kernel" "no-nans-fp-math"="true" "no-trapping-math"="true" "omp_target_thread_limit"="42" "stack-protector-buffer-size"="8" "uniform-work-group-size" } +// NOIEEE: attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,42" "amdgpu-ieee"="false" "kernel" "no-trapping-math"="true" "omp_target_thread_limit"="42" "stack-protector-buffer-size"="8" "uniform-work-group-size" } // DEFAULT: attributes #2 = { convergent mustprogress noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" } // CPU: attributes #2 = { convergent mustprogress noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx900" } -// NOIEEE: attributes #2 = { convergent mustprogress noinline nounwind optnone "amdgpu-ieee"="false" "no-nans-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" } +// NOIEEE: attributes #2 = { convergent mustprogress noinline nounwind optnone "amdgpu-ieee"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" } diff --git a/flang/include/flang/Optimizer/Transforms/Passes.td b/flang/include/flang/Optimizer/Transforms/Passes.td index bdee252d14c72..38c5fc8db911c 100644 --- a/flang/include/flang/Optimizer/Transforms/Passes.td +++ b/flang/include/flang/Optimizer/Transforms/Passes.td @@ -443,7 +443,7 @@ def FunctionAttr : Pass<"function-attr", "mlir::func::FuncOp"> { Option<"noInfsFPMath", "no-infs-fp-math", "bool", /*default=*/"false", "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.">, + "Set the nnan flag on instructions in the module.">, Option<"approxFuncFPMath", "approx-func-fp-math", "bool", /*default=*/"false", "Set the afn flag on instructions in the module.">, diff --git a/flang/lib/Optimizer/Transforms/FunctionAttr.cpp b/flang/lib/Optimizer/Transforms/FunctionAttr.cpp index 3879a807fda2f..4655ed6ed0d40 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 (noNaNsFPMath) - func->setAttr( - mlir::LLVM::LLVMFuncOp::getNoNansFpMathAttrName(llvmFuncOpName), - mlir::BoolAttr::get(context, true)); if (noSignedZerosFPMath) func->setAttr( mlir::LLVM::LLVMFuncOp::getNoSignedZerosFpMathAttrName(llvmFuncOpName), diff --git a/flang/test/Driver/func-attr-fast-math.f90 b/flang/test/Driver/func-attr-fast-math.f90 index b8f8a0e1c8a63..1878aec403ba3 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-nans-fp-math"="true" {{.*}}"no-signed-zeros-fp-math"="true"{{.*}} } +! CHECK-OFAST: attributes #[[ATTRS]] = { {{.*}}"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-nans-fp-math"="true" {{.*}}"no-signed-zeros-fp-math"="true"{{.*}} } +! CHECK-FFAST-MATH: attributes #[[ATTRS]] = { {{.*}}"no-signed-zeros-fp-math"="true"{{.*}} } diff --git a/llvm/include/llvm/CodeGen/CommandFlags.h b/llvm/include/llvm/CodeGen/CommandFlags.h index c83bce7771878..d111cb9982cb7 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 getEnableNoNaNsFPMath(); - LLVM_ABI bool getEnableNoSignedZerosFPMath(); LLVM_ABI bool getEnableNoTrappingFPMath(); diff --git a/llvm/include/llvm/IR/Attributes.td b/llvm/include/llvm/IR/Attributes.td index 941251003f5ba..88b30c7e3f71b 100644 --- a/llvm/include/llvm/IR/Attributes.td +++ b/llvm/include/llvm/IR/Attributes.td @@ -419,7 +419,6 @@ def AllowDirectAccessInHotPatchFunction /// Target-independent string attributes. def LessPreciseFPMAD : StrBoolAttr<"less-precise-fpmad">; -def NoNansFPMath : StrBoolAttr<"no-nans-fp-math">; def NoSignedZerosFPMath : StrBoolAttr<"no-signed-zeros-fp-math">; def NoJumpTables : StrBoolAttr<"no-jump-tables">; def NoInlineLineTables : StrBoolAttr<"no-inline-line-tables">; @@ -478,7 +477,6 @@ class MergeRule<string F> { } def : MergeRule<"setAND<LessPreciseFPMADAttr>">; -def : MergeRule<"setAND<NoNansFPMathAttr>">; def : MergeRule<"setAND<NoSignedZerosFPMathAttr>">; def : MergeRule<"setOR<NoImplicitFloatAttr>">; def : MergeRule<"setOR<NoJumpTablesAttr>">; diff --git a/llvm/include/llvm/Target/TargetOptions.h b/llvm/include/llvm/Target/TargetOptions.h index e38ec301ff091..89e29d5f102f6 100644 --- a/llvm/include/llvm/Target/TargetOptions.h +++ b/llvm/include/llvm/Target/TargetOptions.h @@ -119,7 +119,7 @@ enum CodeObjectVersionKind { class TargetOptions { public: TargetOptions() - : NoNaNsFPMath(false), NoTrappingFPMath(true), NoSignedZerosFPMath(false), + : NoTrappingFPMath(true), NoSignedZerosFPMath(false), EnableAIXExtendedAltivecABI(false), HonorSignDependentRoundingFPMathOption(false), NoZerosInBSS(false), GuaranteedTailCallOpt(false), StackSymbolOrdering(true), @@ -155,12 +155,6 @@ class TargetOptions { /// MCAsmInfo::BinutilsVersion. std::pair<int, int> BinutilsVersion{0, 0}; - /// 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 - /// assume the FP arithmetic arguments and results are never NaNs. - unsigned NoNaNsFPMath : 1; - /// NoTrappingFPMath - This flag is enabled when the /// -enable-no-trapping-fp-math is specified on the command line. This /// specifies that there are no trap handlers to handle exceptions. diff --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp index 24f74dbd28b61..ff06864d3f6a9 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, EnableNoNaNsFPMath) CGOPT(bool, EnableNoSignedZerosFPMath) CGOPT(bool, EnableNoTrappingFPMath) CGOPT(bool, EnableAIXExtendedAltivecABI) @@ -232,12 +231,6 @@ codegen::RegisterCodeGenFlags::RegisterCodeGenFlags() { "Enable frame pointer elimination"))); CGBINDOPT(FramePointerUsage); - static cl::opt<bool> EnableNoNaNsFPMath( - "enable-no-nans-fp-math", - cl::desc("Enable FP math optimizations that assume no NaNs"), - cl::init(false)); - CGBINDOPT(EnableNoNaNsFPMath); - static cl::opt<bool> EnableNoSignedZerosFPMath( "enable-no-signed-zeros-fp-math", cl::desc("Enable FP math optimizations that assume " @@ -589,7 +582,6 @@ TargetOptions codegen::InitTargetOptionsFromCodeGenFlags(const Triple &TheTriple) { TargetOptions Options; Options.AllowFPOpFusion = getFuseFPOps(); - Options.NoNaNsFPMath = getEnableNoNaNsFPMath(); Options.NoSignedZerosFPMath = getEnableNoSignedZerosFPMath(); Options.NoTrappingFPMath = getEnableNoTrappingFPMath(); @@ -739,7 +731,6 @@ void codegen::setFunctionAttributes(StringRef CPU, StringRef Features, if (getStackRealign()) NewAttrs.addAttribute("stackrealign"); - HANDLE_BOOL_ATTR(EnableNoNaNsFPMathView, "no-nans-fp-math"); HANDLE_BOOL_ATTR(EnableNoSignedZerosFPMathView, "no-signed-zeros-fp-math"); if ((DenormalFPMathView->getNumOccurrences() > 0 || diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index 3494637237c69..9243cdad43e1e 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(NoNaNsFPMath, "no-nans-fp-math"); RESET_OPTION(NoSignedZerosFPMath, "no-signed-zeros-fp-math"); } diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-arith-fp.ll b/llvm/test/Analysis/CostModel/AArch64/sve-arith-fp.ll index a735640311ff6..a7f949d503cb3 100644 --- a/llvm/test/Analysis/CostModel/AArch64/sve-arith-fp.ll +++ b/llvm/test/Analysis/CostModel/AArch64/sve-arith-fp.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64 -mattr=+fullfp16,+sve | FileCheck %s --check-prefixes=CHECK,CHECK-BASE -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64 -mattr=+fullfp16,+sve-b16b16,+sve | FileCheck %s --check-prefixes=CHECK,CHECK-BF16 +; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64 -mattr=+fullfp16,+sve | FileCheck %s --check-prefixes=CHECK,CHECK-BASE +; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64 -mattr=+fullfp16,+sve-b16b16,+sve | FileCheck %s --check-prefixes=CHECK,CHECK-BF16 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" diff --git a/llvm/test/Analysis/CostModel/X86/arith-fma.ll b/llvm/test/Analysis/CostModel/X86/arith-fma.ll index 92da04c5c0a83..e561a2c206ce3 100644 --- a/llvm/test/Analysis/CostModel/X86/arith-fma.ll +++ b/llvm/test/Analysis/CostModel/X86/arith-fma.ll @@ -1,9 +1,9 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+xop | FileCheck %s --check-prefixes=XOP -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+fma,+avx | FileCheck %s --check-prefixes=AVX -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+fma,+avx2 | FileCheck %s --check-prefixes=AVX -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+fma,+avx512f | FileCheck %s --check-prefixes=AVX512 -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+fma,+avx512f,+avx512bw | FileCheck %s --check-prefixes=AVX512 +; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+xop | FileCheck %s --check-prefixes=XOP +; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+fma,+avx | FileCheck %s --check-prefixes=AVX +; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+fma,+avx2 | FileCheck %s --check-prefixes=AVX +; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+fma,+avx512f | FileCheck %s --check-prefixes=AVX512 +; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+fma,+avx512f,+avx512bw | FileCheck %s --check-prefixes=AVX512 define i32 @fma(i32 %arg) { ; XOP-LABEL: 'fma' diff --git a/llvm/test/Analysis/CostModel/X86/arith-fp.ll b/llvm/test/Analysis/CostModel/X86/arith-fp.ll index 8f9a47c7ef930..e3eb3e60b844c 100644 --- a/llvm/test/Analysis/CostModel/X86/arith-fp.ll +++ b/llvm/test/Analysis/CostModel/X86/arith-fp.ll @@ -1,15 +1,15 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=-sse2 | FileCheck %s --check-prefixes=SSE1 -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+sse2 | FileCheck %s --check-prefixes=SSE2 -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE42 -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1 -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2 -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512 -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=AVX512 -; -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mcpu=slm | FileCheck %s --check-prefixes=SLM -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mcpu=goldmont | FileCheck %s --check-prefixes=GLM -; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mcpu=btver2 | FileCheck %s --check-prefixes=AVX,AVX1 +; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=-sse2 | FileCheck %s --check-prefixes=SSE1 +; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+sse2 | FileCheck %s --check-prefixes=SSE2 +; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE42 +; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1 +; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2 +; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512 +; RUN: opt < %s -passes... [truncated] `````````` </details> https://github.com/llvm/llvm-project/pull/186285 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
