[LLVMdev] SCCP and undef branches

Domagoj Babic babic.domagoj at gmail.com
Wed Jun 7 12:59:42 PDT 2006


Hi,

Here's something I don't understand... How come that UNDEF can
appear as a branch condition at all? I just can't think of any ways.

If you write something like

fun() {
  int x;
  if (x > 100) {
     ...
  } else {
     ...
  }
}

LLVM generates a boolean temporary that compares (uninitialized)
value of x with 100.

Second, if it already can appear, isn't that a bug that should be
reported by the compiler?

Domagoj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060607/eac27aea/attachment.html>


More information about the llvm-dev mailing list