[llvm] Fix incorrect codegen with respect to GEPs #85333 (PR #88440)

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 08:58:52 PDT 2024


ilovepi wrote:

> GVNSink still has to be correct when considered as a standalone pass. 

Agreed. That was kind of what I was getting at, though I didn't express it that clearly. I guess my sentiment is "hey, if GVNSink needs the IR to be in a certain state, shouldn't it ensure it's in that state itself (e.g., by running some canonicalization routine)?". 

> Besides, the i8 canonicalization is currently only applied to constant offsets, while GVNSink presumably also operates on non-constants.

Ah, that is true, I had forgotten we *only* do that for constant offsets.

https://github.com/llvm/llvm-project/pull/88440


More information about the llvm-commits mailing list