[all-commits] [llvm/llvm-project] 763d1a: [InstCombine] Fix a crash in `PointerReplacer`
Shilei Tian via All-commits
all-commits at lists.llvm.org
Mon Jul 15 21:30:11 PDT 2024
Branch: refs/heads/users/shiltian/07-15-_instcombine_remove_early_replacement_of_uses_in_pointerreplacer
Home: https://github.com/llvm/llvm-project
Commit: 763d1a719a26b7a7c42fa5a42ef3ce4d260b13d2
https://github.com/llvm/llvm-project/commit/763d1a719a26b7a7c42fa5a42ef3ce4d260b13d2
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/select-from-load.ll
Log Message:
-----------
[InstCombine] Fix a crash in `PointerReplacer`
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.
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