[all-commits] [llvm/llvm-project] f38baa: [InstCombine] Fix a crash in `PointerReplacer` (#9...

Shilei Tian via All-commits all-commits at lists.llvm.org
Tue Jul 16 10:17:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f38baad3e7395af94290aac21e587bc1c5f00946
      https://github.com/llvm/llvm-project/commit/f38baad3e7395af94290aac21e587bc1c5f00946
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2024-07-16 (Tue, 16 Jul 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
    A llvm/test/Transforms/InstCombine/AMDGPU/select-from-load.ll

  Log Message:
  -----------
  [InstCombine] Fix a crash in `PointerReplacer` (#98987)

A crash could happen in `PointerReplacer::replace` when constructing a
new
select instruction and there is no replacement for one of its operand.
This can
happen when the operand is a load instruction that has been replaced
earlier
such that the operand itself is already the new value. In this case, it
is not
in the replacement map and `getReplacement` simply returns nullptr.

Fix SWDEV-472192.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list