[PATCH] D140747: [Transform] Rewrite LowerSwitch using APInt

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 11:30:28 PST 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/LowerSwitch.cpp:461
-      APInt N = High - Low + 1;
-      assert(N.sge(SignedZero) && "Popularity shouldn't be negative.");
       // Explict insert to make sure the bitwidth of APInts match
----------------
I don't understand why this wouldn't just be unsigned to begin with


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140747



More information about the llvm-commits mailing list