[llvm] [InstCombine] Extend folding of aggregate construction to cases when source aggregates are partially available (PR #100828)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 10:24:06 PDT 2024
weiguozhi wrote:
The test case is extracted from hot path of tcmalloc, so it has real world impact.
This patch uses LoopInfo, so you need to run it with
```
bin/opt -passes='instcombine<use-loop-info>' reduced.ll
```
I ran the patch on your smaller test case, and got
```
opt -passes='instcombine<use-loop-info>' reduced2.ll -S
define hidden { i64, i64 } @"_ZN4core6result19Result$LT$T$C$E$GT$7map_err17h84015741f1851E.llvm"(i64 noundef %0, i64 %1) unnamed_addr {
%3 = insertvalue { i64, i64 } poison, i64 %0, 0
%4 = insertvalue { i64, i64 } %3, i64 %1, 1
ret { i64, i64 } %4
}
```
How did you run it?
https://github.com/llvm/llvm-project/pull/100828
More information about the llvm-commits
mailing list