Skip to content

[RISCV] Correct qc.e.li instruction definition #132380

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 1 commit into from
Mar 22, 2025
Merged

Conversation

svs-quic
Copy link
Contributor

The instruction has no tied operands. It was incorrectly using QCIRVInstEAI which has a tied operand for the destination register.

It was incorrectly using QCIRVInstEAI which has a tied operand for
the destination register.
@llvmbot
Copy link
Member

llvmbot commented Mar 21, 2025

@llvm/pr-subscribers-backend-risc-v

Author: Sudharsan Veeravalli (svs-quic)

Changes

The instruction has no tied operands. It was incorrectly using QCIRVInstEAI which has a tied operand for the destination register.


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

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td (+10-1)
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td b/llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td
index c009bd3b24682..86d31937ab7a2 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td
@@ -726,7 +726,16 @@ let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
     let Inst{15-12} = imm20{18-15};
   }
 
-  def QC_E_LI : QCIRVInstEAI<0b000, 0b0, "qc.e.li">;
+  def QC_E_LI : RVInst48<(outs GPRNoX0:$rd), (ins simm32:$imm),
+                         "qc.e.li", "$rd, $imm", [], InstFormatOther> {
+    bits<5> rd;
+    bits<32> imm;
+
+    let Inst{47-16} = imm;
+    let Inst{15-12} = 0b0000;
+    let Inst{11-7} = rd;
+    let Inst{6-0} = 0b0011111;
+  }
 } // hasSideEffects = 0, mayLoad = 0, mayStore = 0
 } // Predicates = [HasVendorXqcili, IsRV32]
 

Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

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

LGTM

@lenary lenary merged commit 6419905 into llvm:main Mar 22, 2025
13 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 22, 2025

LLVM Buildbot has detected a new failure on builder lldb-aarch64-ubuntu running on linaro-lldb-aarch64-ubuntu while building llvm at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/14724

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-api :: lang/cpp/global_variables/TestCPPGlobalVariables.py (807 of 2109)
PASS: lldb-api :: lang/cpp/incompatible-class-templates/TestCppIncompatibleClassTemplates.py (808 of 2109)
PASS: lldb-api :: lang/cpp/keywords_enabled/TestCppKeywordsEnabled.py (809 of 2109)
PASS: lldb-api :: lang/cpp/inlines/TestInlines.py (810 of 2109)
PASS: lldb-api :: lang/cpp/incomplete-types/members/TestCppIncompleteTypeMembers.py (811 of 2109)
UNSUPPORTED: lldb-api :: lang/cpp/libcxx-internals-recognizer/TestLibcxxInternalsRecognizer.py (812 of 2109)
PASS: lldb-api :: lang/cpp/incomplete-stl-types/TestStlIncompleteTypes.py (813 of 2109)
UNSUPPORTED: lldb-api :: lang/cpp/modules-import/TestCXXModulesImport.py (814 of 2109)
PASS: lldb-api :: lang/cpp/lambdas/TestLambdas.py (815 of 2109)
PASS: lldb-api :: lang/cpp/llvm-style/TestLLVMStyle.py (816 of 2109)
FAIL: lldb-api :: lang/cpp/incomplete-types/TestCppIncompleteTypes.py (817 of 2109)
******************** TEST 'lldb-api :: lang/cpp/incomplete-types/TestCppIncompleteTypes.py' FAILED ********************
Script:
--
/usr/bin/python3.10 /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin --arch aarch64 --build-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin --lldb-obj-root /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./lib /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/test/API/lang/cpp/incomplete-types -p TestCppIncompleteTypes.py
--
Exit Code: -11

Command Output (stdout):
--
lldb version 21.0.0git (https://github.com/llvm/llvm-project.git revision 6419905f53d4dbdb9d49358115ccba873f674dd4)
  clang revision 6419905f53d4dbdb9d49358115ccba873f674dd4
  llvm revision 6419905f53d4dbdb9d49358115ccba873f674dd4
Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc']

--
Command Output (stderr):
--
UNSUPPORTED: LLDB (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/clang-aarch64) :: test_limit_debug_info_dsym (TestCppIncompleteTypes.TestCppIncompleteTypes) (test case does not fall in any category of interest for this run) 
PASS: LLDB (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/clang-aarch64) :: test_limit_debug_info_dwarf (TestCppIncompleteTypes.TestCppIncompleteTypes)
PASS: LLDB (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/clang-aarch64) :: test_limit_debug_info_dwo (TestCppIncompleteTypes.TestCppIncompleteTypes)
UNSUPPORTED: LLDB (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/clang-aarch64) :: test_partial_limit_debug_info_dsym (TestCppIncompleteTypes.TestCppIncompleteTypes) (test case does not fall in any category of interest for this run) 
PASS: LLDB (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/clang-aarch64) :: test_partial_limit_debug_info_dwarf (TestCppIncompleteTypes.TestCppIncompleteTypes)
PASS: LLDB (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/clang-aarch64) :: test_partial_limit_debug_info_dwo (TestCppIncompleteTypes.TestCppIncompleteTypes)
----------------------------------------------------------------------
Ran 6 tests in 1.960s

OK (skipped=2)

--

********************
PASS: lldb-api :: lang/cpp/multiple-inheritance/TestCppMultipleInheritance.py (818 of 2109)
PASS: lldb-api :: lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py (819 of 2109)
PASS: lldb-api :: lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py (820 of 2109)
PASS: lldb-api :: iohandler/autosuggestion/TestAutosuggestion.py (821 of 2109)
PASS: lldb-api :: lang/cpp/namespace_conflicts/TestNamespaceConflicts.py (822 of 2109)
PASS: lldb-api :: lang/cpp/non-type-template-param/TestCppNonTypeTemplateParam.py (823 of 2109)
PASS: lldb-api :: lang/cpp/nested-class-other-compilation-unit/TestNestedClassWithParentInAnotherCU.py (824 of 2109)

@svs-quic svs-quic deleted the genli branch March 22, 2025 02:38
Copy link
Contributor

@hchandel hchandel left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants