[PATCH] D39011: [SimplifyCFG] try harder to forward switch condition to phi (PR34471)

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 22 10:06:02 PDT 2017


dberlin added a comment.

Hey Sanjay,
GVN/NewGVN/et al will undo this transform, and propagate constants. In fact, i expect pretty much any pass that can, will.

This definitely belongs in the late simplification category at best.

More than that, i'm concerned this is the wrong fix.

Why is the right answer  to undo the transform (which will cause fights between passes)  in simplifycfg instead of improving the codegen to recognize the issue?

It seems the same code you are using to detect and undo the transforrm in simplification could be used to codegen it better.


Repository:
  rL LLVM

https://reviews.llvm.org/D39011





More information about the llvm-commits mailing list