[all-commits] [llvm/llvm-project] 0f494f: [codegen]Ensure __builtin_trap() has an unreachabl...
Vy Nguyen via All-commits
all-commits at lists.llvm.org
Wed Jul 15 12:53:38 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0f494fc6576600f79bbcdb5314fbed6c13da7395
https://github.com/llvm/llvm-project/commit/0f494fc6576600f79bbcdb5314fbed6c13da7395
Author: Vy Nguyen <1762963+oontvoo at users.noreply.github.com>
Date: 2026-07-15 (Wed, 15 Jul 2026)
Changed paths:
M clang/lib/CodeGen/CGExpr.cpp
M clang/test/CodeGen/amdgpu-builtin-is-invocable.c
M clang/test/CodeGen/amdgpu-builtin-processor-is.c
M clang/test/CodeGen/attr-nomerge.cpp
A clang/test/CodeGen/builtin-trap.c
M clang/test/CodeGen/pr53127.cpp
M clang/test/CodeGenCXX/microsoft-abi-byval-vararg.cpp
M clang/test/CodeGenCXX/microsoft-vector-deleting-dtors2.cpp
M clang/test/CodeGenCXX/trap-fnattr.cpp
M clang/test/CodeGenCXX/vararg-non-pod.cpp
M clang/test/DebugInfo/CXX/verbose-trap.cpp
M clang/test/Headers/gpuintrin.c
M clang/test/OpenMP/spirv_target_codegen_noexceptions.cpp
M compiler-rt/test/profile/gcov-__gcov_flush-terminate.c
Log Message:
-----------
[codegen]Ensure __builtin_trap() has an unreachable (#197789)
```
void test2() {
__builtin_trap();
}
```
Previously, this would generate this:
```
; Function Attrs: mustprogress noinline nounwind optnone uwtable
define dso_local void @test2()() #2 !dbg !14 {
call void @llvm.trap(), !dbg !15
ret void, !dbg !16
}
```
Now we'll have `unreachable` after the trap
```
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @test2() #0 {
call void @llvm.trap()
unreachable
}
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list