diff options
| author | Roman Tereshin <rtereshin@apple.com> | 2018-05-31 16:16:48 +0000 |
|---|---|---|
| committer | Roman Tereshin <rtereshin@apple.com> | 2018-05-31 16:16:48 +0000 |
| commit | 667c7581ed25e591732a25e0c1752ab8bff44aa3 (patch) | |
| tree | 88639dfe9da073a2bfe212aa8f034023c70ceb0b /llvm/lib/Target/ARM | |
| parent | cc1a16fdf9d5f53f01486b48584b4119a2af359e (diff) | |
| download | bcm5719-llvm-667c7581ed25e591732a25e0c1752ab8bff44aa3.tar.gz bcm5719-llvm-667c7581ed25e591732a25e0c1752ab8bff44aa3.zip | |
[GlobalISel][ARM] LegalizerInfo verifier: Adding LegalizerInfo::verify(...) call and fixing bugs exposed
Reviewers: aemerson, qcolombet
Reviewed By: qcolombet
Differential Revision: https://reviews.llvm.org/D46339
llvm-svn: 333663
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMLegalizerInfo.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp index dcf80fafb90..89141830690 100644 --- a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp +++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp @@ -101,7 +101,8 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) { setAction({Op, s32}, Libcall); } - getActionDefinitionsBuilder({G_SEXT, G_ZEXT, G_ANYEXT}).legalFor({s32}); + getActionDefinitionsBuilder({G_SEXT, G_ZEXT, G_ANYEXT}) + .legalForCartesianProduct({s32}, {s1, s8, s16}); getActionDefinitionsBuilder(G_INTTOPTR).legalFor({{p0, s32}}); getActionDefinitionsBuilder(G_PTRTOINT).legalFor({{s32, p0}}); @@ -172,8 +173,8 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) { else setFCmpLibcallsGNU(); - getActionDefinitionsBuilder(G_FPEXT).libcallFor({s64, s32}); - getActionDefinitionsBuilder(G_FPTRUNC).libcallFor({s32, s64}); + getActionDefinitionsBuilder(G_FPEXT).libcallFor({{s64, s32}}); + getActionDefinitionsBuilder(G_FPTRUNC).libcallFor({{s32, s64}}); getActionDefinitionsBuilder({G_FPTOSI, G_FPTOUI}) .libcallForCartesianProduct({s32}, {s32, s64}); @@ -189,6 +190,7 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) { getActionDefinitionsBuilder({G_FREM, G_FPOW}).libcallFor({s32, s64}); computeTables(); + verify(*ST.getInstrInfo()); } void ARMLegalizerInfo::setFCmpLibcallsAEABI() { |

