aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfoImpls.cpp
diff options
context:
space:
mode:
authorDianQK <dianqk@dianqk.net>2023-02-19 16:42:33 +0800
committerDianQK <dianqk@dianqk.net>2023-02-19 19:42:40 +0800
commitb6eed9a82e0ce530d94a194c88615d6c272e1854 (patch)
treed8c9b99afc7cf3f2209ed7def7fa49761c99293d /llvm/lib/CodeGen/MachineModuleInfoImpls.cpp
parent37f5c598a22a0e11d827979c910befb0b57c2033 (diff)
downloadllvm-b6eed9a82e0ce530d94a194c88615d6c272e1854.zip
llvm-b6eed9a82e0ce530d94a194c88615d6c272e1854.tar.gz
llvm-b6eed9a82e0ce530d94a194c88615d6c272e1854.tar.bz2
[SimplifyCFG] Check if the return instruction causes undefined behavior
This should fix https://github.com/rust-lang/rust/issues/107681. Return undefined to a noundef return value is undefined. Example: ``` define noundef i32 @test_ret_noundef(i1 %cond) { entry: br i1 %cond, label %bb1, label %bb2 bb1: br label %bb2 bb2: %r = phi i32 [ undef, %entry ], [ 1, %bb1 ] ret i32 %r } ``` Differential Revision: https://reviews.llvm.org/D144319
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfoImpls.cpp')
0 files changed, 0 insertions, 0 deletions