[PATCH] D70794: [GlobalISel] Fix compiler crash lowering G_LOAD in AArch64.

Daniel Rodríguez Troitiño via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 18:31:29 PST 2019


drodriguez marked 2 inline comments as done.
drodriguez added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/legalize-load-trunc.mir:1
+# RUN: llc -march=aarch64 -run-pass=legalizer %s -o - -verify-machineinstrs | FileCheck %s
+---
----------------
qcolombet wrote:
> Could you generate the checks using the `update_mir_test` thing?
> Like @aemerson pointed out the checks look wrong and I am wondering if you found another bug, or just forgot to update the test.
I didn’t know about the tool. I will generate the checks with it.


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/legalize-load-trunc.mir:14
+    ; CHECK: [[LOAD:%[0-9]+]]:_(s10) = G_LOAD %0(p0) :: (load 2)
+    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s10) = G_TRUNC [[LOAD]](s16)
+    ; CHECK: [[TRUNC2:%[0-9]+]]:_(s1) = G_TRUNC [[LOAD]](s10)
----------------
aemerson wrote:
> This looks wrong. The resulting code is a load that generates an s10? But that value is then truncated down from s16 to s10? Shouldn't the load be 16 bit?
I think I forgot to run the `FileCheck` at the end to correct this things. I will send a new diff asap. Sorry for the confusion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70794/new/

https://reviews.llvm.org/D70794





More information about the llvm-commits mailing list