[llvm] [AArch64] Remove superfluous sxtw in peephole opt (PR #96293)
Krasimir Georgiev via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 07:05:56 PDT 2024
krasimirgg wrote:
I rolled back the patch yesterday, sorry for not leaving a comment about that here in a timely manner.
We saw some issues with this in some halide-generated code.
It appears that after this, llc segfaults on the following code:
```
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
target triple = "aarch64--linux-eabi"
define i32 @f(i32 %0) {
entry:
%1 = sext i32 %0 to i64
br label %A
A:
%2 = trunc i64 %1 to i32
%a69.us = sub i32 0, %2
%a69.us.fr = freeze i32 %a69.us
%3 = zext i32 %a69.us.fr to i64
br label %B
B:
%t = icmp eq i64 0, %3
br i1 %t, label %A, label %B
}
```
`assert.h assertion failed at .../llvm/lib/CodeGen/LiveVariables.cpp:159 in void llvm::LiveVariables::HandleVirtRegUse(Register, MachineBasicBlock *, MachineInstr &): MRI->getVRegDef(Reg) && "Register use before def!"`
https://github.com/llvm/llvm-project/pull/96293
More information about the llvm-commits
mailing list