4 Commits

Author SHA1 Message Date
David Green
73af455f57
[InstCombine] Handle more scalable geps in EmitGEPOffset (#71699)
Following up on #71565, this makes scalable splats in EmitGEPOffset use
the ElementCount as opposed to assuming it is fixed width, and attempts
to handle scalable offsets with vector geps by splatting the vscale to
each vector lane.
2023-11-11 18:21:31 +00:00
David Green
3ccbd68480
[InstCombine] Handle scalable geps in EmitGEPOffset (#71565)
This adds scalable handling for scalable vectors in emitGEPOffset. This
was noticed in some tests that Biplob was creating, so might be unlikely
to come up much in practice. I've attempted to add test coverage for
various places EmitGEPOffset is called. The vscale intrinsics will
currently emit multiple copies, relying on later CSE to combine them.
2023-11-08 15:50:32 +00:00
Nikita Popov
02678bc91a [Local] Merge constant / non-constant code paths (NFC)
Let IRBuilder perform the constant folding. Avoids some uses of
ConstantExpr.
2023-10-11 16:27:32 +02:00
Benjamin Kramer
a3d58bbaff Detemplate llvm::EmitGEPOffset and move it into a cpp file. NFC. 2022-12-29 16:24:21 +01:00