<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - error in backend: Cannot select: 0x57c3c10: i32,ch = load<(load 1 from %ir.87 + 2), zext from i8> 0x57bbd20, 0x57b9a90, undef:ch"
   href="https://bugs.llvm.org/show_bug.cgi?id=39571">39571</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>error in backend: Cannot select: 0x57c3c10: i32,ch = load<(load 1 from %ir.87 + 2), zext from i8> 0x57bbd20, 0x57b9a90, undef:ch
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>arnd@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>