New user self-registration is disabled due to spam. For an account please email bugs-admin@lists.llvm.org with your e-mail address and full name.

Bug 45432 - Assertion failed: (isImm() && "Wrong MachineOperand accessor"), function getImm, file llvm/include/llvm/CodeGen/MachineOperand.h, line 536.
Summary: Assertion failed: (isImm() && "Wrong MachineOperand accessor"), function getI...
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: PowerPC (show other bugs)
Version: 10.0
Hardware: Other FreeBSD
: P normal
Assignee: Hal Finkel
URL:
Keywords: regression
Depends on:
Blocks: release-10.0.1
  Show dependency tree
 
Reported: 2020-04-04 17:11 PDT by Piotr Kubaj
Modified: 2020-06-23 14:51 PDT (History)
7 users (show)

See Also:
Fixed By Commit(s): a56d057dfe3127c111c3470606c04e96d35b1fa3 1f3be0e9b7b


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj 2020-04-04 17:11:04 PDT
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.
Comment 1 Alfredo Dal'Ava Júnior 2020-05-19 05:51:55 PDT
This compiles on LLVM 9.0.1, so it's a LLVM 10 regression that is also seen on trunk@3e315697ac7
Comment 2 Alfredo Dal'Ava Júnior 2020-05-19 06:56:43 PDT
Despite being a regression between 9 and 10, marking the release-10.0.1 blocker for you to decide. Thanks!
Comment 3 Nemanja Ivanovic 2020-06-07 20:22:08 PDT
Should be fixed with
https://reviews.llvm.org/rGa56d057dfe3127c111c3470606c04e96d35b1fa3
Comment 4 Piotr Kubaj 2020-06-10 03:10:12 PDT
Thanks! Could you backport it to 10.0.1?
Comment 5 Eli Friedman 2020-06-10 11:57:54 PDT
(Reopening to handle 10.0.1 nomination.)
Comment 6 Tom Stellard 2020-06-11 10:38:52 PDT
Hal, what do you think about backporting this?

https://reviews.llvm.org/rGa56d057dfe3127c111c3470606c04e96d35b1fa3
Comment 7 Hal Finkel 2020-06-23 14:26:36 PDT
(In reply to Tom Stellard from comment #6)
> Hal, what do you think about backporting this?
> 
> https://reviews.llvm.org/rGa56d057dfe3127c111c3470606c04e96d35b1fa3

LGTM.
Comment 8 Tom Stellard 2020-06-23 14:51:49 PDT
Merged: 1f3be0e9b7b