Skip to content
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

[RISCV] Return MILog2SEW for mask instructions getOperandLog2EEW. NFC #122332

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

topperc
Copy link
Collaborator

@topperc topperc commented Jan 9, 2025

The SEW operand for these instructions should have a value of 0. This matches what was done for vcpop/vfirst.

The SEW operand for these instructions should have a value of 0.
This matches what was done for vcpop/vfirst.
@llvmbot
Copy link
Member

llvmbot commented Jan 9, 2025

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

Author: Craig Topper (topperc)

Changes

The SEW operand for these instructions should have a value of 0. This matches what was done for vcpop/vfirst.


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

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp (+1-1)
diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index 9a0938bc38dd45..cab7f746ac9335 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -633,7 +633,7 @@ getOperandLog2EEW(const MachineOperand &MO, const MachineRegisterInfo *MRI) {
   case RISCV::VMSBF_M:
   case RISCV::VMSIF_M:
   case RISCV::VMSOF_M: {
-    return 0;
+    return MILog2SEW;
   }
 
   // Vector Iota Instruction

Copy link
Contributor

@michaelmaitland michaelmaitland left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@preames preames left a comment

Choose a reason for hiding this comment

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

LGTM

@topperc topperc merged commit b16777a into llvm:main Jan 9, 2025
8 of 9 checks passed
@topperc topperc deleted the pr/mask-log2eew branch January 9, 2025 19:36
BaiXilin pushed a commit to BaiXilin/llvm-fix-vnni-instr-types that referenced this pull request Jan 12, 2025
…llvm#122332)

The SEW operand for these instructions should have a value of 0. This
matches what was done for vcpop/vfirst.
Mel-Chen pushed a commit to Mel-Chen/llvm-project that referenced this pull request Jan 13, 2025
…llvm#122332)

The SEW operand for these instructions should have a value of 0. This
matches what was done for vcpop/vfirst.
DKLoehr pushed a commit to DKLoehr/llvm-project that referenced this pull request Jan 17, 2025
…llvm#122332)

The SEW operand for these instructions should have a value of 0. This
matches what was done for vcpop/vfirst.
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.

None yet

4 participants