[PATCH] D155939: [SimplifyCFG][NFC] Add tests for merging the combination of phis in switch

DianQK via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 22:07:43 PDT 2023


DianQK added inline comments.


================
Comment at: llvm/test/Transforms/SimplifyCFG/merge-phis-in-switch.ll:72
+start:
+  switch i8 %arg, label %unreachable [
+  i8 0, label %case012
----------------
XChy wrote:
> DianQK wrote:
> > Is the `%unreachable` necessary?
> > https://llvm.godbolt.org/z/cfj7Y8nnd
> Not necessary for merging phis. But only with unreachable can we fold it into `add i8 %arg, 1` through lookup table optimization.
Oh, you're right.


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

https://reviews.llvm.org/D155939



More information about the llvm-commits mailing list