diff options
| author | Aditya Nandakumar <aditya_nandakumar@apple.com> | 2017-04-07 21:49:30 +0000 |
|---|---|---|
| committer | Aditya Nandakumar <aditya_nandakumar@apple.com> | 2017-04-07 21:49:30 +0000 |
| commit | eb80a51b52b669e63778dbdca1f25ed34c5a8149 (patch) | |
| tree | a0e22854e989fe86ef3aca55339da2b730371cd4 /llvm/test/CodeGen/AArch64/GlobalISel | |
| parent | 492db487335eb7b7a73c8e0434210e87263b9dbd (diff) | |
| download | bcm5719-llvm-eb80a51b52b669e63778dbdca1f25ed34c5a8149.tar.gz bcm5719-llvm-eb80a51b52b669e63778dbdca1f25ed34c5a8149.zip | |
[GlobalISel]: Fix bug where we can report GISelFailure on erased instructions
The original instruction might get legalized and erased and expanded
into intermediate instructions and the intermediate instructions might
fail legalization. This end up in reporting GISelFailure on the erased
instruction.
Instead report GISelFailure on the intermediate instruction which failed
legalization.
Reviewed by: ab
llvm-svn: 299802
Diffstat (limited to 'llvm/test/CodeGen/AArch64/GlobalISel')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/GlobalISel/gisel-fail-intermediate-legalizer.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/gisel-fail-intermediate-legalizer.ll b/llvm/test/CodeGen/AArch64/GlobalISel/gisel-fail-intermediate-legalizer.ll new file mode 100644 index 00000000000..e333f742e04 --- /dev/null +++ b/llvm/test/CodeGen/AArch64/GlobalISel/gisel-fail-intermediate-legalizer.ll @@ -0,0 +1,8 @@ +;RUN: llc -mtriple=aarch64-unknown-unknown -o - -global-isel -global-isel-abort=2 %s 2>&1 | FileCheck %s +; CHECK: fallback +; CHECK-LABEL: foo +define i16 @foo(half* %p) { + %tmp0 = load half, half* %p + %tmp1 = fptoui half %tmp0 to i16 + ret i16 %tmp1 +} |

