Skip to content

NVPTX: "LLVM ERROR: Cannot select" when translating num::from_str_radix #41132

Open
@japaric

Description

@japaric

STR

$ rustc libcore/lib.rs
LLVM ERROR: Cannot select: 0x7f1356ad1170: i64,ch,glue = NVPTXISD::LoadParam<LDST0[<unknown>](align=8)> 0x7f13567aa6c0:1, Constant:i32<1>, Constant:i32<1454182880>, 0x7f13567aa6c0:2
  0x7f13567aac00: i32 = Constant<1>
  0x7f1356ad18e0: i32 = Constant<1454182880>
  0x7f13567aa6c0: i64,ch,glue = NVPTXISD::LoadParam<LDST16[<unknown>](align=8)> 0x7f1356420650, Constant:i32<1>, Constant:i32<0>, 0x7f1356420650:1
    0x7f13567aac00: i32 = Constant<1>
    0x7f134764fba0: i32 = Constant<0>
    0x7f1356420650: ch,glue = NVPTXISD::CallArgEnd 0x7f13546d9620, Constant:i32<1>, 0x7f13546d9620:1
      0x7f13567aac00: i32 = Constant<1>
      0x7f13546d9620: ch,glue = NVPTXISD::LastCallArg 0x7f13567aa5e0, Constant:i32<1>, Constant:i32<0>, 0x7f13567aa5e0:1
        0x7f13567aac00: i32 = Constant<1>
        0x7f134764fba0: i32 = Constant<0>
        0x7f13567aa5e0: ch,glue = NVPTXISD::CallArgBegin 0x7f1356ad1aa0, 0x7f1356ad1aa0:1
          0x7f1356ad1aa0: ch,glue = NVPTXISD::CallVoid 0x7f1356ad1a30, 0x7f13546d9460, 0x7f1356ad1a30:1
            0x7f13546d9460: i64 = NVPTXISD::Wrapper TargetGlobalAddress:i64<i128 (i32)* @"_ZN54_$LT$u128$u20$as$u20$core..num..FromStrRadixHelper$GT$8from_u3217h2e1aa7ebab2ba02cE"> 0
              0x7f13549f5900: i64 = TargetGlobalAddress<i128 (i32)* @"_ZN54_$LT$u128$u20$as$u20$core..num..FromStrRadixHelper$GT$8from_u3217h2e1aa7ebab2ba02cE"> 0
            0x7f1356ad1a30: ch,glue = NVPTXISD::PrintCallUni 0x7f134764ff20, Constant:i32<1>, 0x7f134764ff20:1
              0x7f13567aac00: i32 = Constant<1>
              0x7f134764ff20: ch,glue = NVPTXISD::DeclareRet 0x7f1356273c20, Constant:i32<1>, Constant:i32<128>, Constant:i32<0>, 0x7f1356273c20:1
                0x7f13567aac00: i32 = Constant<1>
                0x7f1356ad11e0: i32 = Constant<128>
                0x7f134764fba0: i32 = Constant<0>
                0x7f1356273c20: ch,glue = NVPTXISD::StoreParam<LDST4[<unknown>]> 0x7f13568bf2e0, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, 0x7f13568bf2e0:1
                  0x7f134764fba0: i32 = Constant<0>
                  0x7f134764fba0: i32 = Constant<0>
                  0x7f134764fba0: i32 = Constant<0>
                  0x7f13568bf2e0: ch,glue = NVPTXISD::DeclareScalarParam 0x7f13568beda0, Constant:i32<0>,Constant:i32<32>, Constant:i32<0>, 0x7f13568beda0:1




In function: _ZN4core3num14from_str_radix17h4c0c1d66bbd93620E

NOTE: Requires turning off LLVM assertions to avoid #38824

Meta

$ rustc --version
rustc 1.18.0-dev (50c186419 2017-04-06)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.O-NVPTXTarget: the NVPTX LLVM backend for running rust on GPUs, https://llvm.org/docs/NVPTXUsage.htmlT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions