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

Hongyu Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 21:52:55 PDT 2023


XChy marked an inline comment as done.
XChy 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
----------------
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.


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

https://reviews.llvm.org/D155939



More information about the llvm-commits mailing list