Skip to content

CodeGen: Add ISD::AssertNoFPClass #135946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Apr 25, 2025
Merged

Conversation

wzssyqa
Copy link
Contributor

@wzssyqa wzssyqa commented Apr 16, 2025

It is used to mark a value that we are sure that it is not some fcType.
The examples include:

  • An arguments of a function is marked with nofpclass
  • Output value of an intrinsic can be sure to not be some type

So that the following operation can make some assumptions.

@wzssyqa wzssyqa requested a review from arsenm April 16, 2025 10:16
@llvmbot llvmbot added the llvm:SelectionDAG SelectionDAGISel as well label Apr 16, 2025
@wzssyqa wzssyqa requested a review from topperc April 16, 2025 10:16
@llvmbot
Copy link
Member

llvmbot commented Apr 16, 2025

@llvm/pr-subscribers-backend-aarch64

@llvm/pr-subscribers-llvm-selectiondag

Author: YunQiang Su (wzssyqa)

Changes

It is used to mark a value that we are sure that it is not some fcType.
The examples include:

  • An arguments of a function is marked with nofpclass
  • Output value of an intrinsic can be sure to not be some type
    So that the following operation can make some assumptions.

Full diff: https://github.com/llvm/llvm-project/pull/135946.diff

7 Files Affected:

  • (modified) llvm/include/llvm/CodeGen/ISDOpcodes.h (+6)
  • (modified) llvm/include/llvm/Target/TargetSelectionDAG.td (+1)
  • (modified) llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp (+3)
  • (modified) llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (+3)
  • (modified) llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (+4)
  • (modified) llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp (+1)
  • (modified) llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (+1)
diff --git a/llvm/include/llvm/CodeGen/ISDOpcodes.h b/llvm/include/llvm/CodeGen/ISDOpcodes.h
index ad8a95a353b56..7a9b716f652f3 100644
--- a/llvm/include/llvm/CodeGen/ISDOpcodes.h
+++ b/llvm/include/llvm/CodeGen/ISDOpcodes.h
@@ -67,6 +67,12 @@ enum NodeType {
   /// poisoned the assertion will not be true for that value.
   AssertAlign,
 
+  /// AssertNoFPClass - These nodes record if a register contains a float
+  /// value that is known to be not some type.
+  /// NOTE: In case of the source value (or any vector element value) is
+  /// poisoned the assertion will not be true for that value.
+  AssertNoFPClass,
+
   /// Various leaf nodes.
   BasicBlock,
   VALUETYPE,
diff --git a/llvm/include/llvm/Target/TargetSelectionDAG.td b/llvm/include/llvm/Target/TargetSelectionDAG.td
index 9c241b6c4df0f..8453cf7f4e58a 100644
--- a/llvm/include/llvm/Target/TargetSelectionDAG.td
+++ b/llvm/include/llvm/Target/TargetSelectionDAG.td
@@ -859,6 +859,7 @@ def SDT_assert : SDTypeProfile<1, 1,
   [SDTCisInt<0>, SDTCisInt<1>, SDTCisSameAs<1, 0>]>;
 def assertsext : SDNode<"ISD::AssertSext", SDT_assert>;
 def assertzext : SDNode<"ISD::AssertZext", SDT_assert>;
+def assernofpclass : SDNode<"ISD::AssertNoFPClass", SDTFPUnaryOp>;
 def assertalign : SDNode<"ISD::AssertAlign", SDT_assert>;
 
 def convergencectrl_anchor : SDNode<"ISD::CONVERGENCECTRL_ANCHOR",
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
index 432209e8ecb0a..d03eeaa01b697 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
@@ -168,6 +168,7 @@ void DAGTypeLegalizer::SoftenFloatResult(SDNode *N, unsigned ResNo) {
     case ISD::POISON:
     case ISD::UNDEF:       R = SoftenFloatRes_UNDEF(N); break;
     case ISD::VAARG:       R = SoftenFloatRes_VAARG(N); break;
+    case ISD::AssertNoFPClass:       R = GetSoftenedFloat(N->getOperand(0)); break;
     case ISD::VECREDUCE_FADD:
     case ISD::VECREDUCE_FMUL:
     case ISD::VECREDUCE_FMIN:
@@ -2576,6 +2577,7 @@ bool DAGTypeLegalizer::PromoteFloatOperand(SDNode *N, unsigned OpNo) {
       R = PromoteFloatOp_FAKE_USE(N, OpNo);
       break;
     case ISD::FCOPYSIGN:  R = PromoteFloatOp_FCOPYSIGN(N, OpNo); break;
+    case ISD::AssertNoFPClass:
     case ISD::FP_TO_SINT:
     case ISD::FP_TO_UINT:
     case ISD::LROUND:
@@ -2803,6 +2805,7 @@ void DAGTypeLegalizer::PromoteFloatResult(SDNode *N, unsigned ResNo) {
     case ISD::FTRUNC:
     case ISD::FTAN:
     case ISD::FTANH:
+    case ISD::AssertNoFPClass:
     case ISD::FCANONICALIZE: R = PromoteFloatRes_UnaryOp(N); break;
 
     // Binary FP Operations
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
index f934d8b37561e..d98d76b24bd7a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -129,6 +129,7 @@ void DAGTypeLegalizer::ScalarizeVectorResult(SDNode *N, unsigned ResNo) {
   case ISD::UINT_TO_FP:
   case ISD::ZERO_EXTEND:
   case ISD::FCANONICALIZE:
+  case ISD::AssertNoFPClass:
     R = ScalarizeVecRes_UnaryOp(N);
     break;
   case ISD::ADDRSPACECAST:
@@ -1278,6 +1279,7 @@ void DAGTypeLegalizer::SplitVectorResult(SDNode *N, unsigned ResNo) {
   case ISD::UINT_TO_FP:
   case ISD::VP_UINT_TO_FP:
   case ISD::FCANONICALIZE:
+  case ISD::AssertNoFPClass:
     SplitVecRes_UnaryOp(N, Lo, Hi);
     break;
   case ISD::ADDRSPACECAST:
@@ -4846,6 +4848,7 @@ void DAGTypeLegalizer::WidenVectorResult(SDNode *N, unsigned ResNo) {
   case ISD::FREEZE:
   case ISD::ARITH_FENCE:
   case ISD::FCANONICALIZE:
+  case ISD::AssertNoFPClass:
     Res = WidenVecRes_Unary(N);
     break;
   case ISD::FMA: case ISD::VP_FMA:
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index d6dcb3f15ae7c..9c821eabc4de3 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -7365,6 +7365,10 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
            N2.getOpcode() == ISD::TargetConstant && "Invalid FP_ROUND!");
     if (N1.getValueType() == VT) return N1;  // noop conversion.
     break;
+  case ISD::AssertNoFPClass:
+    assert(N1.getValueType().isFloatingPoint() &&
+           "AssertNoFPClass is used for a non-floating type");
+    return N1;
   case ISD::AssertSext:
   case ISD::AssertZext: {
     EVT EVT = cast<VTSDNode>(N2)->getVT();
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
index 8fcec6c6cd7c6..240115ac739f0 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
@@ -122,6 +122,7 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const {
   case ISD::TokenFactor:                return "TokenFactor";
   case ISD::AssertSext:                 return "AssertSext";
   case ISD::AssertZext:                 return "AssertZext";
+  case ISD::AssertNoFPClass:            return "AssertNoFPClass";
   case ISD::AssertAlign:                return "AssertAlign";
 
   case ISD::BasicBlock:                 return "BasicBlock";
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 598de6b207754..62d911fed2a3f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -3265,6 +3265,7 @@ void SelectionDAGISel::SelectCodeCommon(SDNode *NodeToMatch,
     return;
   case ISD::AssertSext:
   case ISD::AssertZext:
+  case ISD::AssertNoFPClass:
   case ISD::AssertAlign:
     ReplaceUses(SDValue(NodeToMatch, 0), NodeToMatch->getOperand(0));
     CurDAG->RemoveDeadNode(NodeToMatch);

@wzssyqa
Copy link
Contributor Author

wzssyqa commented Apr 16, 2025

One example about how to use it: #130051

Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch should include the wiring up to the argument lowering with tests

wzssyqa added 4 commits April 21, 2025 10:47
It is used to mark a value that we are sure that it is not some fcType.
The examples include:
  * An arguments of a function is marked with nofpclass
  * Output value of an intrinsic can be sure to not be some type
So that the following operation can make some assumptions.
@wzssyqa wzssyqa force-pushed the CodeGen_add_AssertNoFPClass branch from 6882da8 to d77aef1 Compare April 21, 2025 02:52
Your Name and others added 2 commits April 21, 2025 18:35
1. Use Op.getConstantOperandVal to get Constant value
2. (NoFPClass & fcNan) == fcNan
3. Use N2->getAsZExtValue() to get Constant value
4. Use getTargetConstant with ptr width to fix 32bit target
5. Don't propagate the flags
6. Add MIPSr6 testcase for 32bit target tests
@wzssyqa wzssyqa requested a review from arsenm April 21, 2025 10:38
@wzssyqa wzssyqa requested review from arsenm and RKSimon April 21, 2025 13:26
@wzssyqa wzssyqa requested a review from arsenm April 22, 2025 00:42
@wzssyqa wzssyqa requested a review from arsenm April 24, 2025 05:31
@wzssyqa wzssyqa merged commit f0c61d2 into llvm:main Apr 25, 2025
11 checks passed
@mikaelholmen
Copy link
Collaborator

Hello @wzssyqa ,

With this patch
clang -c -ffast-math bbi-106508.c
starts crashing like

clang: ../lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:5595: SDValue llvm::DAGTypeLegalizer::WidenVecRes_Unary(SDNode *): Assertion `N->getNumOperands() == 3 && "Unexpected number of operands!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: build-all/bin/clang -c -ffast-math bbi-106508.c
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module 'bbi-106508.c'.
4.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@f'
 #0 0x00005653df4ff2d6 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (build-all/bin/clang+0x861e2d6)
 #1 0x00005653df4fcdbe llvm::sys::RunSignalHandlers() (build-all/bin/clang+0x861bdbe)
 #2 0x00005653df4fe614 llvm::sys::CleanupOnSignal(unsigned long) (build-all/bin/clang+0x861d614)
 #3 0x00005653df45fa9d CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #4 0x00007f1b31a62d10 __restore_rt (/lib64/libpthread.so.0+0x12d10)
 #5 0x00007f1b2f40252f raise (/lib64/libc.so.6+0x4e52f)
 #6 0x00007f1b2f3d5e65 abort (/lib64/libc.so.6+0x21e65)
 #7 0x00007f1b2f3d5d39 _nl_load_domain.cold.0 (/lib64/libc.so.6+0x21d39)
 #8 0x00007f1b2f3fae86 (/lib64/libc.so.6+0x46e86)
 #9 0x00005653e0a7f0a8 llvm::DAGTypeLegalizer::WidenVecRes_Unary(llvm::SDNode*) LegalizeVectorTypes.cpp:0:0
#10 0x00005653e0a70f55 llvm::DAGTypeLegalizer::WidenVectorResult(llvm::SDNode*, unsigned int) LegalizeVectorTypes.cpp:0:0
#11 0x00005653e0a0d0ab llvm::DAGTypeLegalizer::run() LegalizeTypes.cpp:0:0
#12 0x00005653e0a12b19 llvm::SelectionDAG::LegalizeTypes() (build-all/bin/clang+0x9b31b19)
#13 0x00005653e09ceb48 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (build-all/bin/clang+0x9aedb48)
#14 0x00005653e09cbec4 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (build-all/bin/clang+0x9aeaec4)
#15 0x00005653e09ca811 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (build-all/bin/clang+0x9ae9811)
#16 0x00005653e09c8009 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (build-all/bin/clang+0x9ae7009)
#17 0x00005653de924547 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (build-all/bin/clang+0x7a43547)
#18 0x00005653deea4c39 llvm::FPPassManager::runOnFunction(llvm::Function&) (build-all/bin/clang+0x7fc3c39)
#19 0x00005653deead232 llvm::FPPassManager::runOnModule(llvm::Module&) (build-all/bin/clang+0x7fcc232)
#20 0x00005653deea5718 llvm::legacy::PassManagerImpl::run(llvm::Module&) (build-all/bin/clang+0x7fc4718)
#21 0x00005653dfcc3ff9 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (build-all/bin/clang+0x8de2ff9)
#22 0x00005653dfcdacb7 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (build-all/bin/clang+0x8df9cb7)
#23 0x00005653e18170f9 clang::ParseAST(clang::Sema&, bool, bool) (build-all/bin/clang+0xa9360f9)
#24 0x00005653e0323cf4 clang::FrontendAction::Execute() (build-all/bin/clang+0x9442cf4)
#25 0x00005653e028b38d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (build-all/bin/clang+0x93aa38d)
#26 0x00005653e0429095 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (build-all/bin/clang+0x9548095)
#27 0x00005653dc99aa27 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (build-all/bin/clang+0x5ab9a27)
#28 0x00005653dc996f2d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#29 0x00005653e00be379 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::$_0>(long) Job.cpp:0:0
#30 0x00005653df45f796 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (build-all/bin/clang+0x857e796)
#31 0x00005653e00bd883 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (build-all/bin/clang+0x91dc883)
#32 0x00005653e0075b17 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (build-all/bin/clang+0x9194b17)
#33 0x00005653e0075e37 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (build-all/bin/clang+0x9194e37)
#34 0x00005653e00966f9 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (build-all/bin/clang+0x91b56f9)
#35 0x00005653dc996566 clang_main(int, char**, llvm::ToolContext const&) (build-all/bin/clang+0x5ab5566)
#36 0x00005653dc9a71c6 main (build-all/bin/clang+0x5ac61c6)
#37 0x00007f1b2f3ee7e5 __libc_start_main (/lib64/libc.so.6+0x3a7e5)
#38 0x00005653dc9947ee _start (build-all/bin/clang+0x5ab37ee)

bbi-106508.c.gz

@john-brawn-arm
Copy link
Collaborator

It looks like there's a different failure with the following:

target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "thumbv7em-unknown-none-eabi"

define dso_local noundef nofpclass(nan inf) half @fn(half noundef returned nofpclass(nan inf) %x) {
entry:
  ret half %x
}

llc -debug gives

Legalizing node: t6: f16 = AssertNoFPClass t4, TargetConstant:i32<519>
Analyzing result type: f16
Soft promote half result 0: t6: f16 = AssertNoFPClass t4, TargetConstant:i32<519>
SoftPromoteHalfResult #0: t6: f16 = AssertNoFPClass t4, TargetConstant:i32<519>

LLVM ERROR: Do not know how to soft promote this operator's result!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /data_nvme1n1/johbra01/llvm-project/build/bin/llc tmp.ll -o - -debug
1.      Running pass 'Function Pass Manager' on module 'tmp.ll'.
2.      Running pass 'ARM Instruction Selection' on function '@fn'
 #0 0x0000598f54474272 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /data_nvme1n1/johbra01/llvm-project/llvm/lib/Support/Unix/Signals.inc:808:3
 #1 0x0000598f54471c0f llvm::sys::RunSignalHandlers() /data_nvme1n1/johbra01/llvm-project/llvm/lib/Support/Signals.cpp:105:20
 #2 0x0000598f54471fa9 SignalHandler(int, siginfo_t*, void*) /data_nvme1n1/johbra01/llvm-project/llvm/lib/Support/Unix/Signals.inc:418:13
 #3 0x000078b0eb845330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #4 0x000078b0eb89eb2c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x000078b0eb89eb2c __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x000078b0eb89eb2c pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x000078b0eb84527e raise ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x000078b0eb8288ff abort ./stdlib/abort.c:81:7
 #9 0x0000598f510b8142 llvm::json::operator==(llvm::json::Array const&, llvm::json::Array const&) /data_nvme1n1/johbra01/llvm-project/llvm/include/llvm/Support/JSON.h:580:58
#10 0x0000598f510b8142 llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) /data_nvme1n1/johbra01/llvm-project/llvm/lib/Support/JSON.cpp:206:28
#11 0x0000598f543ce185 (/data_nvme1n1/johbra01/llvm-project/build/bin/llc+0x3e3b185)
#12 0x0000598f54342420 llvm::DAGTypeLegalizer::SoftPromoteHalfResult(llvm::SDNode*, unsigned int) /data_nvme1n1/johbra01/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:32
86:58
#13 0x0000598f542c4fc0 llvm::DAGTypeLegalizer::run() /data_nvme1n1/johbra01/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:266:14
#14 0x0000598f542c6511 llvm::SmallVectorTemplateCommon<llvm::SDNode*, void>::isSmall() const /data_nvme1n1/johbra01/llvm-project/llvm/include/llvm/ADT/SmallVector.h:143:39
#15 0x0000598f542c6511 llvm::SmallVectorImpl<llvm::SDNode*>::~SmallVectorImpl() /data_nvme1n1/johbra01/llvm-project/llvm/include/llvm/ADT/SmallVector.h:603:23
#16 0x0000598f542c6511 llvm::SmallVector<llvm::SDNode*, 128u>::~SmallVector() /data_nvme1n1/johbra01/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1203:3
#17 0x0000598f542c6511 llvm::DAGTypeLegalizer::~DAGTypeLegalizer() /data_nvme1n1/johbra01/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h:31:31
#18 0x0000598f542c6511 llvm::SelectionDAG::LegalizeTypes() /data_nvme1n1/johbra01/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:1060:10
#19 0x0000598f54237157 llvm::TimeRegion::~TimeRegion() /data_nvme1n1/johbra01/llvm-project/llvm/include/llvm/Support/Timer.h:160:9
#20 0x0000598f54237157 llvm::NamedRegionTimer::~NamedRegionTimer() /data_nvme1n1/johbra01/llvm-project/llvm/include/llvm/Support/Timer.h:168:8
#21 0x0000598f54237157 llvm::SelectionDAGISel::CodeGenAndEmitDAG() /data_nvme1n1/johbra01/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:980:3
#22 0x0000598f5423bac5 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /data_nvme1n1/johbra01/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1906:33
#23 0x0000598f5423d17a llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /data_nvme1n1/johbra01/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:615:22
#24 0x0000598f51d92da8 (anonymous namespace)::ARMDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) /data_nvme1n1/johbra01/llvm-project/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:70:3
#25 0x0000598f54232c27 llvm::OptLevelChanger::~OptLevelChanger() /data_nvme1n1/johbra01/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:268:11
#26 0x0000598f54232c27 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) /data_nvme1n1/johbra01/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:375:
1
#27 0x0000598f54232c27 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) /data_nvme1n1/johbra01/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:346:
6
#28 0x0000598f53494a8a llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) /data_nvme1n1/johbra01/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:108:30
#29 0x0000598f53a5f984 llvm::FPPassManager::runOnFunction(llvm::Function&) /data_nvme1n1/johbra01/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1416:7
#30 0x0000598f53a5fba1 llvm::ilist_detail::node_base_prevnext<llvm::ilist_node_base<true, void>, true>::getNext() const /data_nvme1n1/johbra01/llvm-project/llvm/include/llvm/ADT/ilist_node_
base.h:42:38
#31 0x0000598f53a5fba1 llvm::ilist_node_impl<llvm::ilist_detail::node_options<llvm::Function, true, false, void, false, void>>::getNext() /data_nvme1n1/johbra01/llvm-project/llvm/include/ll
vm/ADT/ilist_node.h:119:66
#32 0x0000598f53a5fba1 llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, true, false, void, false, void>, false, false>::operator++() /data_nvme1n1/johbra01/llvm-project
/llvm/include/llvm/ADT/ilist_iterator.h:187:25
#33 0x0000598f53a5fba1 llvm::FPPassManager::runOnModule(llvm::Module&) /data_nvme1n1/johbra01/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1451:22
#34 0x0000598f53a603ed runOnModule /data_nvme1n1/johbra01/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1528:7
#35 0x0000598f53a603ed llvm::legacy::PassManagerImpl::run(llvm::Module&) /data_nvme1n1/johbra01/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:539:55
#36 0x0000598f51203e66 compileModule(char**, llvm::LLVMContext&) /data_nvme1n1/johbra01/llvm-project/llvm/tools/llc/llc.cpp:755:34
#37 0x0000598f510bee77 main /data_nvme1n1/johbra01/llvm-project/llvm/tools/llc/llc.cpp:400:35
#38 0x000078b0eb82a1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#39 0x000078b0eb82a28b call_init ./csu/../csu/libc-start.c:128:20
#40 0x000078b0eb82a28b __libc_start_main ./csu/../csu/libc-start.c:347:5
#41 0x0000598f511f92e5 _start (/data_nvme1n1/johbra01/llvm-project/build/bin/llc+0xc662e5)

@wzssyqa
Copy link
Contributor Author

wzssyqa commented Apr 30, 2025

Thanks for your report. I am working on fix them.

@mikaelholmen
Copy link
Collaborator

Thanks for your report. I am working on fix them.

Maybe revert in the meantime? It's been broken for several days already.

wzssyqa added a commit that referenced this pull request Apr 30, 2025
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
It is used to mark a value that we are sure that it is not some fcType.
The examples include:
  * An arguments of a function is marked with nofpclass
  * Output value of an intrinsic can be sure to not be some type

So that the following operation can make some assumptions.

---------

Co-authored-by: Your Name <[email protected]>
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
It is used to mark a value that we are sure that it is not some fcType.
The examples include:
  * An arguments of a function is marked with nofpclass
  * Output value of an intrinsic can be sure to not be some type

So that the following operation can make some assumptions.

---------

Co-authored-by: Your Name <[email protected]>
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
It is used to mark a value that we are sure that it is not some fcType.
The examples include:
  * An arguments of a function is marked with nofpclass
  * Output value of an intrinsic can be sure to not be some type

So that the following operation can make some assumptions.

---------

Co-authored-by: Your Name <[email protected]>
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request May 9, 2025
It is used to mark a value that we are sure that it is not some fcType.
The examples include:
  * An arguments of a function is marked with nofpclass
  * Output value of an intrinsic can be sure to not be some type

So that the following operation can make some assumptions.

---------

Co-authored-by: Your Name <[email protected]>
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AArch64 llvm:SelectionDAG SelectionDAGISel as well
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants