[PATCH] D76931: [ValueLattice] Distinguish between constant ranges with/without undef.

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 10:55:33 PDT 2020


aqjune added a comment.

Hi,
The semantics of whether br undef is nondet. choice or UB really has been a topic between me and Nuno too.
As @nikic said, we can define it as UB if which branch to take depends on an undef value.
And I think this semantics explains many more optimizations in LLVM as well (including the CVP example that removes and 255 :) ).
It seems this is not explicitly stated at LangRef; it would be great if it is mentioned to avoid further confusion.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76931





More information about the llvm-commits mailing list