Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM Error on PowerPC64LE: Cannot select ... #50499

Closed
CryZe opened this issue May 7, 2018 · 6 comments
Closed

LLVM Error on PowerPC64LE: Cannot select ... #50499

CryZe opened this issue May 7, 2018 · 6 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-PowerPC Target: PowerPC processors P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another.

Comments

@CryZe
Copy link
Contributor

CryZe commented May 7, 2018

Since the switch to LLVM 6 my builds on PowerPC64LE have been consistently failing with the following error:

LLVM ERROR: Cannot select: 0x7fa027678410: ch = PPCISD::STBRX<ST6[%658](align=1)> 0x7fa02663ce38, 0x7fa0228a63a8, 0x7fa027678ea0, ValueType:ch:i48
  0x7fa0228a63a8: i32 = truncate 0x7fa027938820
    0x7fa027938820: i64 = srl 0x7fa027678750, Constant:i32<16>
      0x7fa027678750: i64 = or 0x7fa0277aebc8, 0x7fa026724680
        0x7fa0277aebc8: i64,ch = CopyFromReg 0x7fa029932440, Register:i64 %200
          0x7fa0279382d8: i64 = Register %200
        0x7fa026724680: i64 = shl nuw nsw 0x7fa027938410, Constant:i32<16>
          0x7fa027938410: i64 = AssertZext 0x7fa027938a28, ValueType:ch:i8
            0x7fa027938a28: i64,ch = CopyFromReg 0x7fa029932440, Register:i64 %202
              0x7fa027938c30: i64 = Register %202
          0x7fa027678958: i32 = Constant<16>
      0x7fa027678958: i32 = Constant<16>
  0x7fa027678ea0: i64,ch = CopyFromReg 0x7fa029932440, Register:i64 %158
    0x7fa0277b0068: i64 = Register %158
In function: _ZN6base646decode13decode_helper17h84289d425683d5b3E.llvm.15558209233772563096

CI Build

This seems to be something that the base64 crate is triggering.

@nagisa nagisa added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-PowerPC Target: PowerPC processors regression-from-stable-to-stable Performance or correctness regression from one stable version to another. labels May 7, 2018
@nagisa
Copy link
Member

nagisa commented May 7, 2018

https://bugs.llvm.org/show_bug.cgi?id=32140.

Minimal rust test case:

#[no_mangle]
pub fn foo(accum: u64, output: &mut [u8;6]) {
    unsafe {
        let bytes = *(&accum.to_be() as *const _ as *const [u8; 8]);
        ::std::ptr::copy_nonoverlapping(bytes.as_ptr(), output.as_mut_ptr(), 6);
    }
}

@cuviper
Copy link
Member

cuviper commented May 7, 2018

We encountered this in Fedora bz1554349 -- sorry I neglected to report it to Rust too.
We linked it to LLVM bz 35402, now RESOLVED FIXED.

@cuviper
Copy link
Member

cuviper commented May 7, 2018

Another PPC64 issue we hit (though big-endian) was LLVM 37039. I can backport both of these to rust-lang/llvm, if nobody else is already.

@cuviper
Copy link
Member

cuviper commented May 7, 2018

Both of those fixes are also in the release_60 branch destined for the imminent LLVM 6.0.1, so we could also just rebase rust-lang/llvm to pick those up.

@nikomatsakis
Copy link
Contributor

cc @cuviper @nagisa -- what is status here, are those backports in progress?

@nikomatsakis nikomatsakis added the P-high High priority label May 10, 2018
@cuviper
Copy link
Member

cuviper commented May 10, 2018

I merged the release_60 backports from upstream LLVM, and @alexcrichton pulled that into #50514.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-PowerPC Target: PowerPC processors P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another.
Projects
None yet
Development

No branches or pull requests

4 participants