[all-commits] [llvm/llvm-project] 1db51d: [Transform] Rewrite LowerSwitch using APInt

Peter Rong via All-commits all-commits at lists.llvm.org
Thu Jan 5 14:30:57 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1db51d8eb2d220a4f0000555ada310990098cf5b
      https://github.com/llvm/llvm-project/commit/1db51d8eb2d220a4f0000555ada310990098cf5b
  Author: Peter Rong <PeterRong96 at gmail.com>
  Date:   2023-01-05 (Thu, 05 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/Utils/LowerSwitch.cpp
    A llvm/test/Transforms/LowerSwitch/pr59316.ll

  Log Message:
  -----------
  [Transform] Rewrite LowerSwitch using APInt

This rewrite fixes https://github.com/llvm/llvm-project/issues/59316.

Previously LowerSwitch uses int64_t, which will crash on case branches using integers with more than 64 bits.
Using APInt fixes this problem. This patch also includes a test

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D140747




More information about the All-commits mailing list