Skip to content

Dead calls with convergence token uses are not deleted #129856

@arsenm

Description

@arsenm

Calls with convergencectrl bundles appear to never be deleted when unused:

; RUN:  opt -S -mtriple=amdgcn-amd-amdhsa -O3 %s

; The calls should be deleted
define void @dead_readfirstlane_convergencetoken(<2 x i32> %src) convergent {
  %t = call token @llvm.experimental.convergence.entry()
  %vec = call <2 x i32> @llvm.amdgcn.readfirstlane.v2i32(<2 x i32> %src) [ "convergencectrl"(token %t) ]
  ret void
}

In this example, every pass is a no-op. I would expect instcombine or any of the DCE passes to erase the entry token and readfirstlane call

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions