Skip to content

Assertion failed: (isImm() && "Wrong MachineOperand accessor"), function getImm, file llvm/include/llvm/CodeGen/MachineOperand.h, line 536. #44777

@pkubaj

Description

@pkubaj
Bugzilla Link 45432
Resolution FIXED
Resolved on Jun 23, 2020 14:51
Version 10.0
OS FreeBSD
Blocks #44654
CC @adalava,@DimitryAndric,@efriedma-quic,@nemanjai,@tstellar
Fixed by commit(s) a56d057 1f3be0e

Extended Description

FreeBSD head on powerpc64, LLVM 10.0.0.

The following problem happens when compiling astro/swe port. Reduced test case:
struct a {
int b
};
struct c {
double d;
struct a e[]
};
__thread struct c f;
g;
h() {
struct a i = f.e[g];
if (i.b)
j();
}

Compiling flags:
/usr/bin/cc -cc1 -triple powerpc64-unknown-freebsd13.0 -emit-obj -mrelocation-model static -O1 -x c sweph-e7e60d.c

When -mrelocation-model static and -O1 or higher are passed, assertion failure happens.

Without -mrelocation-model static, -O2 and -O3 may be set.
With -mrelocation-model static, only -O0 works.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions