Skip to content

TLS with large code model on x86_64-apple-darwin asserts #80831

Closed
@nikic

Description

@nikic
target triple = "x86_64-apple-macosx10.12.0"

@g = external thread_local global i8

define ptr @test() {
  ret ptr @g
}

!llvm.module.flags = !{!0}

!0 = !{i32 1, !"Code Model", i32 4}

Results in:

llc: /home/npopov/repos/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:35071: MachineBasicBlock *llvm::X86TargetLowering::EmitLoweredTLSCall(MachineInstr &, MachineBasicBlock *) const: Assertion `MI.getOperand(3).isGlobal() && "This should be a global"' failed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions