[llvm] [MachineSink][AArch64] Enable sink-and-fold by default (PR #72132)
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 11 05:56:05 PST 2023
TNorthover wrote:
Another potential problem, I'm afraid. Seen in https://green.lab.llvm.org/green/job/test-suite-verify-machineinstrs-aarch64-O3, but I think this reduced case still shows it:
```
define i32 @unaspack212(ptr %image, i32 %ep) {
entry:
%add149 = add i32 %ep, 1
%idxprom150 = zext i32 %add149 to i64
%arrayidx151 = getelementptr i8, ptr %image, i64 %idxprom150
br label %land.lhs.true55
land.lhs.true55: ; preds = %if.then155, %land.lhs.true55, %entry
%0 = load i8, ptr %arrayidx151, align 1
%cmp153 = icmp eq i8 %0, 0
br i1 %cmp153, label %if.then155, label %land.lhs.true55
if.then155: ; preds = %land.lhs.true55
store i32 0, ptr %image, align 1
br label %land.lhs.true55
}
```
compiled with `llc -verify-machineinstrs`. Basically the sinking leaves a dangling `ORRWrs` that was part of the `zext` and marks the register we care about `killed`.
https://github.com/llvm/llvm-project/pull/72132
More information about the llvm-commits
mailing list