Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GlobalISel] LegalizerInfo: Enable legalization of non-power-of-2 types
Summary: Legalize only if the type is marked as Legal or Custom. If not, return Unsupported as LegalizerHelper is not able to handle non-power-of-2 types right now. Reviewers: qcolombet, aditya_nandakumar, dsanders, t.p.northover, kristof.beyls, javed.absar, ab Reviewed By: kristof.beyls, ab Subscribers: dberris, rovka, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D31711 llvm-svn: 299929
- Loading branch information
Volkan Keles
committed
Apr 11, 2017
1 parent
b050c7f
commit 64ad85f
Showing
3 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
llvm/test/CodeGen/AArch64/GlobalISel/legalize-nonpowerof2eltsvec.mir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# RUN: llc -O0 -run-pass=legalizer -global-isel %s -o - | FileCheck %s | ||
|
||
--- | | ||
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" | ||
target triple = "aarch64--" | ||
define void @test_legalize_merge_v3s32() { | ||
ret void | ||
} | ||
... | ||
--- | ||
name: test_legalize_merge_v3s32 | ||
registers: | ||
- { id: 0, class: _ } | ||
- { id: 1, class: _ } | ||
- { id: 2, class: _ } | ||
- { id: 3, class: _ } | ||
body: | | ||
bb.0: | ||
liveins: %w0, %w1, %w2 | ||
; CHECK-LABEL: name: test_legalize_merge_v3s32 | ||
; CHECK: [[ARG1:%[0-9]+]](s32) = COPY %w0 | ||
; CHECK: [[ARG2:%[0-9]+]](s32) = COPY %w1 | ||
; CHECK: [[ARG3:%[0-9]+]](s32) = COPY %w2 | ||
; CHECK: (<3 x s32>) = G_MERGE_VALUES [[ARG1]](s32), [[ARG2]](s32), [[ARG3]](s32) | ||
%0(s32) = COPY %w0 | ||
%1(s32) = COPY %w1 | ||
%2(s32) = COPY %w2 | ||
%3(<3 x s32>) = G_MERGE_VALUES %0(s32), %1(s32), %2(s32) | ||
... |