[all-commits] [llvm/llvm-project] 5c29e8: [CodegenPrepare] Guard against degenerate branches

Valentin Churavy via All-commits all-commits at lists.llvm.org
Mon Dec 16 01:25:10 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c29e8c65fe372b0239f32b38a0299d9abef3167
      https://github.com/llvm/llvm-project/commit/5c29e8c65fe372b0239f32b38a0299d9abef3167
  Author: Valentin Churavy <v.churavy at gmail.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    A llvm/test/CodeGen/X86/codegen-prepare-collapse.ll

  Log Message:
  -----------
  [CodegenPrepare] Guard against degenerate branches

Summary:
Guard against a potential crash observed in https://github.com/JuliaLang/julia/issues/32994#issuecomment-524249628
If two branches are collapsed we can encounter a degenerate conditional branch `TBB==FBB`.
The subsequent code assumes that they differ, so we exit out early.

Reviewers: ributzka, spatel

Subscribers: loladiro, dexonsmith, hiraditya, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list