[all-commits] [llvm/llvm-project] a02ef6: [llubi] Add support for undef values (#205602)
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Sat Jun 27 10:38:59 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a02ef60ff46c1a9c99cce6ca159229dc2f6c5ff2
https://github.com/llvm/llvm-project/commit/a02ef60ff46c1a9c99cce6ca159229dc2f6c5ff2
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2026-06-28 (Sun, 28 Jun 2026)
Changed paths:
M llvm/include/llvm/Support/Allocator.h
A llvm/test/tools/llubi/undef.ll
R llvm/test/tools/llubi/unsupported_constant.ll
M llvm/tools/llubi/lib/Context.cpp
M llvm/tools/llubi/lib/Context.h
M llvm/tools/llubi/lib/Interpreter.cpp
Log Message:
-----------
[llubi] Add support for undef values (#205602)
Although we are planning to deprecate the undef value, it is still
widely used in the intermediate results of the pipeline, which blocks
the pass bisection. This patch uses `freeze poison` as a refinement of
undef.
Note that the undef value evaluates to different values each time the
user is executed. So it cannot be cached like other constants. A
temporary buffer is introduced to take ownership of these values and
avoid breaking the interface (although this is a bit ugly...). This will
also be used by a follow-up patch for ptrtoint/inttoptr.
>From my experience, it is enough for test case reduction of middle-end
miscompilation bugs (there are still counterexamples like
https://github.com/dtcxzyw/llvm-autoreduce/issues/61). However, when
processing backend miscompilation bugs, lli typically uses a garbage
value, so that llvm-reduce may produce an invalid result. I think we may
need to introduce two flags to migrate this issue: one for poisoning
uninitialized memory, and another for diagnosing immediately when
non-deterministic behaviour occurs. This would prevent llvm-reduce from
converting a deterministic repro into a non-deterministic one.
`llvm/test/tools/llubi/unsupported_constant.ll` is also dropped because
it is annoying to pick another unimplemented constant value...
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