[all-commits] [llvm/llvm-project] 86bf23: [IR] Change the default value of InstertElement to...
Hyeongyu Kim via All-commits
all-commits at lists.llvm.org
Tue Sep 28 06:29:31 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 86bf234d0b7038479292a0d771dc05966140b908
https://github.com/llvm/llvm-project/commit/86bf234d0b7038479292a0d771dc05966140b908
Author: hyeongyu kim <gusrb406 at snu.ac.kr>
Date: 2021-09-28 (Tue, 28 Sep 2021)
Changed paths:
M llvm/include/llvm/IR/IRBuilder.h
M llvm/lib/IR/AutoUpgrade.cpp
M llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
M llvm/unittests/IR/IRBuilderTest.cpp
M llvm/unittests/IR/PatternMatch.cpp
Log Message:
-----------
[IR] Change the default value of InstertElement to poison (1/4)
This patch is for fixing potential insertElement-related bugs like D93818.
```
V = UndefValue::get(VecTy);
for(...)
V = Builder.CreateInsertElementy(V, Elt, Idx);
=>
V = PoisonValue::get(VecTy);
for(...)
V = Builder.CreateInsertElementy(V, Elt, Idx);
```
Like above, this patch changes the placeholder V to poison.
The patch will be separated into several commits.
Reviewed By: aqjune
Differential Revision: https://reviews.llvm.org/D110311
More information about the All-commits
mailing list