[llvm-bugs] [Bug 39571] New: error in backend: Cannot select: 0x57c3c10: i32, ch = load<(load 1 from %ir.87 + 2), zext from i8> 0x57bbd20, 0x57b9a90, undef:ch

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 6 13:48:57 PST 2018


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

            Bug ID: 39571
           Summary: error in backend: Cannot select: 0x57c3c10: i32,ch =
                    load<(load 1 from %ir.87 + 2), zext from i8>
                    0x57bbd20, 0x57b9a90, undef:ch
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: arnd at linaro.org
                CC: llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

I got this error while building an arm32 kernel with
clang-8.0.0-svn346109-1~exp1+0~20181105011153.1881~1.gbpfbe7e6:

fatal error: error in backend: Cannot select: 0x53f1018: i32,ch = load<(load 1
from %ir.87 + 2), zext from i8> 0x53f6078, 0x53f3cb0, undef:ch
In function: mwifiex_cmd_802_11_ad_hoc_start
clang: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 8.0.0-svn346109-1~exp1+0~20181105011153.1881~1.gbpfbe7e6 (trunk)
Target: arm-unknown-linux-gnueabi
Thread model: posix
InstalledDir: /usr/bin

With creduce I got to this testcase:

struct ieee_types_ibss_param_set {
  char element_id;
  char len;
  short atim_window;
};
union ieee_types_ss_param_set {
  struct ieee_types_ibss_param_set ibss_param_set;
} __attribute__((__packed__));
struct host_cmd_ds_802_11_ad_hoc_start {
  char ssid;
  union ieee_types_ss_param_set ss_param_set;
};
struct {
  struct {
    struct host_cmd_ds_802_11_ad_hoc_start adhoc_start;
  } params;
} b;
struct mwifiex_bssdescriptor {};
struct mwifiex_current_bss_params {
  struct mwifiex_bssdescriptor bss_descriptor;
  char band;
};
struct {
  struct mwifiex_adapter *adapter;
  struct mwifiex_current_bss_params curr_bss_params;
} * a;
struct mwifiex_adapter {
  char adhoc_start_band;
};
void *memcpy();
void mwifiex_cmd_802_11_ad_hoc_start() {
  struct mwifiex_adapter c = *a->adapter;
  struct host_cmd_ds_802_11_ad_hoc_start *d = &b.params.adhoc_start;
  struct mwifiex_bssdescriptor *e = &a->curr_bss_params.bss_descriptor;
  a->curr_bss_params.band = c.adhoc_start_band;
  d->ss_param_set.ibss_param_set.element_id = 6;
  d->ss_param_set.ibss_param_set.len = 2;
  memcpy(e, &d->ss_param_set, sizeof(union ieee_types_ss_param_set));
}

$ clang-8 -O1 --target=arm-linux-gnueabi -S test.c
fatal error: error in backend: Cannot select: 0x36f2870: i32,ch =
load<(dereferenceable load 1 from `i32* bitcast (i8* getelementptr inbounds
      (%struct.anon.0, %struct.anon.0* @b, i32 0, i32 0, i32 0, i32 1, i32 0,
i32 0) to i32*)` + 2), zext from i8> 0x36f3160, 0x36f3300, undef:i32
  0x36f2940: i32 = undef
In function: mwifiex_cmd_802_11_ad_hoc_start
clang: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 8.0.0-svn346109-1~exp1+0~20181105011153.1881~1.gbpfbe7e6 (trunk)
Target: arm-unknown-linux-gnueabi
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181106/fbd12bb2/attachment.html>


More information about the llvm-bugs mailing list