diff options
author | Robert Imschweiler <50044286+ro-i@users.noreply.github.com> | 2025-02-04 17:59:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-04 23:59:03 +0700 |
commit | 21560fe6b9c73133fd86723071877c55106df010 (patch) | |
tree | 3853e48dd37a47d760bed5fe97c2961a384231ea /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 906eeeda833b30fb7fdc3b7586de34b65d575b45 (diff) | |
download | llvm-21560fe6b9c73133fd86723071877c55106df010.zip llvm-21560fe6b9c73133fd86723071877c55106df010.tar.gz llvm-21560fe6b9c73133fd86723071877c55106df010.tar.bz2 |
GlobalISel: Fix defined register of invariant.start (#125664)
In contrast to SelectionDAG, GlobalISel created a new virtual register
for the return value of invariant.start, leaving subsequent users of the
invariant.start value with an undefined reference.
A minimal example:
```
%tmp = alloca i32, align 4, addrspace(5)
%tmpI = call ptr @llvm.invariant.start.p5(i64 4, ptr addrspace(5) %tmp) #3
call void @llvm.invariant.end.p5(ptr %tmpI, i64 4, ptr addrspace(5) %tmp) #3
store i32 %i, ptr %tmpI, align 4
```
Although the return value of invariant.start might not be intended for
any use beyond invariant.end (the fuzzer might not have created a
sensible situation here), an implicit definition of the corresponding
virtual register avoids a segfault in the target instruction selector
later.
This LLVM defect was identified via the AMD Fuzzing project.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions