Skip to content

[X86] Cannot select TC_RETURN with +retpoline-indirect-calls #175965

@nikic

Description

@nikic
define void @foo(ptr %g) #0 {
  tail call void %g()
  ret void
}

attributes #0 = { "target-features"="+retpoline-indirect-calls" }

llc -mtriple=x86_64-pc-windows-gnu (also with -msvc) produces:

LLVM ERROR: Cannot select: t5: ch = X86ISD::TC_RETURN t0, t2, TargetConstant:i32<0>, RegisterMask:Untyped
  t2: i64,ch = CopyFromReg t0, Register:i64 %0
In function: foo

This is a regression from LLVM 21.

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions