Skip to content

Conversation

@pfusik
Copy link
Contributor

@pfusik pfusik commented Feb 13, 2025

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Feb 13, 2025

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

Author: Piotr Fusik (pfusik)

Changes

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

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVVMV0Elimination.cpp (+4-4)
diff --git a/llvm/lib/Target/RISCV/RISCVVMV0Elimination.cpp b/llvm/lib/Target/RISCV/RISCVVMV0Elimination.cpp index efd92c55e3adf..ccc86da340440 100644 --- a/llvm/lib/Target/RISCV/RISCVVMV0Elimination.cpp +++ b/llvm/lib/Target/RISCV/RISCVVMV0Elimination.cpp @@ -159,10 +159,10 @@ bool RISCVVMV0Elimination::runOnMachineFunction(MachineFunction &MF) { if (MO.isReg() && MO.getReg().isVirtual() && MRI.getRegClass(MO.getReg()) == &RISCV::VMV0RegClass) { MRI.recomputeRegClass(MO.getReg()); - assert(MRI.getRegClass(MO.getReg()) != &RISCV::VMV0RegClass || - MI.isInlineAsm() || - MRI.getVRegDef(MO.getReg())->isInlineAsm() && - "Non-inline-asm use of vmv0 left behind"); + assert((MRI.getRegClass(MO.getReg()) != &RISCV::VMV0RegClass || + MI.isInlineAsm() || + MRI.getVRegDef(MO.getReg())->isInlineAsm()) && + "Non-inline-asm use of vmv0 left behind"); } } } 
Copy link
Contributor

@lukel97 lukel97 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@lukel97
Copy link
Contributor

lukel97 commented Feb 13, 2025

Looks like my version of Clang isn't reporting this. Were you seeing this on GCC/a newer Clang?

@pfusik
Copy link
Contributor Author

pfusik commented Feb 13, 2025

gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) /home/p.fusik/upstream/llvm-project/llvm/lib/Target/RISCV/RISCVVMV0Elimination.cpp: In member function ‘virtual bool {anonymous}::RISCVVMV0Elimination::runOnMachineFunction(llvm::MachineFunction&)’: /home/p.fusik/upstream/llvm-project/llvm/lib/Target/RISCV/RISCVVMV0Elimination.cpp:164: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] 164 | MRI.getVRegDef(MO.getReg())->isInlineAsm() && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 165 | "Non-inline-asm use of vmv0 left behind"); | 
@pfusik pfusik merged commit 0078e8f into llvm:main Feb 13, 2025
10 checks passed
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request Feb 14, 2025
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants