Page MenuHomePhabricator

[SVE] Remove calls to VectorType::getNumElements from Transforms/Vectorize
Needs ReviewPublic

Authored by ctetreau on Jun 17 2020, 3:19 PM.

Diff Detail

Event Timeline

ctetreau created this revision.Jun 17 2020, 3:19 PM
Herald added a project: Restricted Project. · View Herald Transcript
bmahjour removed a subscriber: bmahjour.Jun 18 2020, 6:55 AM
spatel added inline comments.Jun 25 2020, 8:16 AM

Can VecTy be changed to FixedVectorType*?


IIUC, we can't safely cast to FixedVectorType at this point (the dyn_cast may have failed).

Should we add a test like this:

define <vscale x 4 x float> @scalable_bitcast_same_elt_size(<vscale x 4 x i32> %v) {
  %shuf = shufflevector <vscale x 4 x i32> %v, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
  %r = bitcast <vscale x 4 x i32> %shuf to <vscale x 4 x float>
  ret <vscale x 4 x float> %r

I would add that in a preliminary commit myself, but it already crashes somewhere in the TTI cost model.

ctetreau marked an inline comment as done.Jun 29 2020, 1:57 PM
ctetreau added inline comments.

I can take a look at adding this test case and seeing if I can get to this line with a scalable vector.

fhahn requested changes to this revision.Wed, Jul 15, 10:49 AM

marking as requiring changes (additional test case) to clear up review queue.

This revision now requires changes to proceed.Wed, Jul 15, 10:49 AM