aboutsummaryrefslogtreecommitdiff
path: root/clang/test
diff options
context:
space:
mode:
authorLuke Lau <luke@igalia.com>2024-07-05 11:44:59 +0800
committerGitHub <noreply@github.com>2024-07-05 11:44:59 +0800
commitdb782b44b3471c0ab41950c3f79d0ea7b916c135 (patch)
treec5441e7125b948e51d862f973afac0fc3d5a1652 /clang/test
parent23aff11e9c345fb0ba501a1751997baae15f3b52 (diff)
downloadllvm-db782b44b3471c0ab41950c3f79d0ea7b916c135.zip
llvm-db782b44b3471c0ab41950c3f79d0ea7b916c135.tar.gz
llvm-db782b44b3471c0ab41950c3f79d0ea7b916c135.tar.bz2
[RISCV] Don't forward AVL in VSETVLIInfo if it would clobber other definitions (#97264)
This fixes a crash found when compiling OpenBLAS with -mllvm -verify-machineinstrs. When we "forward" the AVL from the output of a vsetvli, we might have to extend the LiveInterval of the AVL to where insert the new vsetvli. Most of the time we are able to extend the LiveInterval because there's only one val num (definition) for the register. But PHI elimination can assign multiple values to the same register, in which case we end up clobbering a different val num when extending: %x = PseudoVSETVLI %avl, ... %avl = ADDI ... %v = PseudoVADD ..., avl=%x ; %avl is forwarded to PseudoVADD: %x = PseudoVSETVLI %avl, ... %avl = ADDI ... %v = PseudoVADD ..., avl=%avl Here there's no way to extend the %avl from the vsetvli since %avl is redefined, i.e. we have two val nums. This fixes it by only forwarding it when we have exactly one val num, where it should be safe to extend it.
Diffstat (limited to 'clang/test')
0 files changed, 0 insertions, 0 deletions