[llvm] [clang] [flang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2024-02-03 Thread Nikita Popov via cfe-commits
nikic wrote: @Artem-B Thanks for the report. SROA already has a bunch of special handling for `load(c ? p1 : p2)` as well as `load(gep(c ? p1 : p2, idx))`, so it's probably not too hard to also support `load(gep(p, c ? idx1 : idx2))`. In your particular case, it seems like it's actually

[llvm] [clang] [flang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2024-02-02 Thread Artem Belevich via cfe-commits
Artem-B wrote: Another corner case here. Untyped GEP resulted in SimpifyCFG producing a `load(gep(argptr, cond ? 24 : 0))` instead of `load( cond ? gep(argptr, 24) : argptr)` it produced before the patch, and that eventually prevented SROA from processing that load. While it's not a bug in

[llvm] [clang] [flang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2024-01-04 Thread via cfe-commits
BukeBeyond wrote: ### For us, this is the Most Productive update of the year! We are ambitiously building a new language b. b extends and generates C++26, just like C++ generated C in 1979. b runs majority of the same CPU code on mainstream GPUs over just Vulkan. It features single file