[PATCH] D22143: [SimplifyCFG] Rewrite SinkThenElseCodeToEnd

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 14:21:34 PDT 2016


hans added a comment.

> When this works for switches it'll be even more powerful.


Oh yes.

And can it work for function calls too? I.e. transforming

  if (foo)
    x = f(1)
  else
    x = f(2)

to

  x = f(foo ? 1 : 2);


Repository:
  rL LLVM

https://reviews.llvm.org/D22143





More information about the llvm-commits mailing list