[all-commits] [llvm/llvm-project] 1adbe8: [WinEH] Fix inttoptr+phi optimization in presence ...

Reid Kleckner via All-commits all-commits at lists.llvm.org
Sun Mar 1 08:27:43 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1adbe86d87bd4ecffc73ab17c7da56f44816f424
      https://github.com/llvm/llvm-project/commit/1adbe86d87bd4ecffc73ab17c7da56f44816f424
  Author: Reid Kleckner <rnk at google.com>
  Date:   2020-03-01 (Sun, 01 Mar 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
    A llvm/test/Transforms/InstCombine/intptr8.ll

  Log Message:
  -----------
  [WinEH] Fix inttoptr+phi optimization in presence of catchswitch

getFirstInsertionPt's return value must be checked for validity before
casting it to Instruction*. Don't attempt to insert casts after a phi in
a catchswitch block.

Fixes PR45033, introduced in D37832.

Reviewed By: davidxl, hfinkel

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




More information about the All-commits mailing list