[PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

Tim Neumann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 12 16:25:25 PST 2022


TimNN added a comment.

I didn't manage to repro with `opt`, so still no compilable IR. I did some more debugging, though:

- Inside `removeDeadArgumentsFromCallers`, `CB->getCalledFunction()->dump()` (after the modification) is `define void @_RNvXs0_NtNtCs840rfDNPFol_10proc_macro6bridge3rpchINtB5_6EncodeuE6encodeB9_(i8 %0, ptr noalias noundef align 8 dereferenceable(40) %1, ptr noalias nocapture nonnull readnone align 1 %2) unnamed_addr #0 personality ptr @rust_eh_personality !dbg !18034 { ... }`. **Definition, no `noundef`.**
- Inside `callPassesUndefToPassingUndefUBParam`, `Call.getCalledFunction()->dump()` is `declare void @_RNvXs0_NtNtCs840rfDNPFol_10proc_macro6bridge3rpchINtB5_6EncodeuE6encodeB9_(i8 %0, ptr noalias noundef align 8 dereferenceable(40) %1, ptr noalias noundef nonnull align 1 %2) unnamed_addr #2`. **Declaration, `noundef` is back.**


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133036/new/

https://reviews.llvm.org/D133036



More information about the llvm-commits mailing list