[PATCH] D70749: [InstCombine] do not insert nonnull assumption for undef

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 26 17:20:53 PST 2019


efriedma added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/assume-replacing-call.ll:199
+entry:
+  %foo = call i64 @func_test_nonnull(i8* undef) #2
+  br i1 %c, label %ctrue, label %cend
----------------
Isn't this already UB?  From LangRef: "if the parameter [...] is null, the behavior is undefined".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70749





More information about the llvm-commits mailing list