forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MachineCopyPropagation: Do not remove copies preserved by regmask (ll…
…vm#125868) llvm/llvm-project@9e436c2daa44 tries to handle register masks and sub-registers, it avoids clobbering RegUnit presreved by regmask. But it then introduces invalid pointer issues. We delete the copies without invalidate all the use in the CopyInfo, so we dereferenced invalid pointers in next interation, causing asserts. Fixes: llvm#126107 --------- Co-authored-by: Matt Arsenault <[email protected]>
- Loading branch information
Showing
2 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5 | ||
# RUN: llc -o - %s -mtriple=x86_64-- -run-pass=machine-cp | FileCheck %s | ||
|
||
--- | ||
name: main | ||
body: | | ||
bb.0.entry: | ||
liveins: $ymm7 | ||
; CHECK-LABEL: name: main | ||
; CHECK: liveins: $ymm7 | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: renamable $ymm6 = COPY killed renamable $ymm7 | ||
; CHECK-NEXT: CALL64r killed renamable $rax, csr_64_mostregs | ||
; CHECK-NEXT: renamable $ymm6 = VPADDWZ256rr $ymm6, $ymm6 | ||
renamable $ymm6 = COPY killed renamable $ymm7 | ||
CALL64r killed renamable $rax, csr_64_mostregs | ||
renamable $ymm6 = VPADDWZ256rr $ymm6, $ymm6 |