[all-commits] [llvm/llvm-project] edbeae: [RISCV] Explicitly bail if something modifies VL/V...
Luke Lau via All-commits
all-commits at lists.llvm.org
Wed Apr 17 06:30:41 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: edbeae373489a2e710f328ceba50b4740c738217
https://github.com/llvm/llvm-project/commit/edbeae373489a2e710f328ceba50b4740c738217
Author: Luke Lau <luke at igalia.com>
Date: 2024-04-17 (Wed, 17 Apr 2024)
Changed paths:
M llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
M llvm/test/CodeGen/RISCV/rvv/vsetvli-insert.mir
Log Message:
-----------
[RISCV] Explicitly bail if something modifies VL/VTYPE in doLocalPostpass
If an instruction between MI and NextMI uses VL or VTYPE we demand the
respective fields so as to not clobber them at their uses. But we don't
consider if something might modify VL or VTYPE, and will happily coalesce
two vsetvlis when we need to preserve them.
This fixes this by skipping to the next vsetvli. Demanding the fields isn't
enough, as we need to preserve the VL and VTYPE values even if no fields
are demanded.
In practice this doesn't happen, presumably due to there not being any
instructions that write to VL or VTYPE without reading them. But I noticed
this whilst working on a separate patch and split it out.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list