Skip to content

[DirectX] Register properties not initialized, causing UB in passes #126784

Closed
@llvm-beanz

Description

@llvm-beanz

The DirectX backend doesn't currently describe register types and call computeRegisterProperties, so when passes look up cost heuristics for registers they get odd values which can cause passes to do weird things.

For example @farzonl observed loop unrolling happening or not depending on if the underlying register weights were zero-initialized or garbage-initialized. Obviously not great.

AC:

  • create one register type and set its cost to 1

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions