Skip to content

shufflevector of load does not reduce load size #41769

@arsenm

Description

@arsenm
Bugzilla Link 42424
Version trunk
OS All
CC @RKSimon,@rotateright

Extended Description

define <4 x half> @​shuffle_v4f16_0101(<4 x half> addrspace(1)* nocapture readonly %arg0, <4 x half> addrspace(1)* nocapture readnone %arg1) {
%val0 = load <4 x half>, <4 x half> addrspace(1)* %arg0, align 8
%shuffle = shufflevector <4 x half> %val0, <4 x half> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
ret <4 x half> %shuffle
}

I would expect instcombine to recognize that only the low half of the load is used, and reduce this to a load <2 x half>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions