[all-commits] [llvm/llvm-project] 7ec86f: [SimplifyCFG] Fix the compile crash for invalid up...

Allen via All-commits all-commits at lists.llvm.org
Wed Nov 8 20:33:37 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ec86f4d680959d790ad001df96e2d6a74f4f036
      https://github.com/llvm/llvm-project/commit/7ec86f4d680959d790ad001df96e2d6a74f4f036
  Author: Allen <zhongyunde at huawei.com>
  Date:   2023-11-09 (Thu, 09 Nov 2023)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/switch_mask.ll

  Log Message:
  -----------
  [SimplifyCFG] Fix the compile crash for invalid upper bound value (#71351)

Fix the crash for the last land PR70542.

Note:
For '%add = add nuw i32 %x, 1', we can only infer the LowerBound is 1,
but the UpperBound is wrapped to 0 in computeConstantRange.
so we can't assume the UpperBound is valid bound when its value is 0.

Fix https://github.com/llvm/llvm-project/issues/71329.
Reviewed By: zmodem, nikic




More information about the All-commits mailing list