Skip to content

[AMDGPU] Uses SExt on indices in isInterestingPHIIncomingValue #85717

Closed
@DataCorrupted

Description

@DataCorrupted

Reproduction

https://godbolt.org/z/P97TT7fEs

Cause

When i1 true is used as an index, SExt extends it to i32 -1. This would cause BitVector to overflow.
This can be a quick fix by using ZExt over SExt, as we have specified in the language manual that the index shall be treated as an unsigned number. (https://llvm.org/docs/LangRef.html#insertelement-instruction)

Metadata

Metadata

Assignees

Labels

backend:AMDGPUcrashPrefer [crash-on-valid] or [crash-on-invalid]

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions