OSDN Git Service

[GlobalISel] Make multi-step legalization work.
authorKristof Beyls <kristof.beyls@arm.com>
Fri, 30 Jun 2017 08:26:20 +0000 (08:26 +0000)
committerKristof Beyls <kristof.beyls@arm.com>
Fri, 30 Jun 2017 08:26:20 +0000 (08:26 +0000)
commite6f158fee49bf7c6b9dcaf0ef322f0dfb0f161ae
tree342632967e42fe0ac87530803742c6a4d5068643
parentbfae62c2cbac460e01f5d4bbbaae459e17ad2437
[GlobalISel] Make multi-step legalization work.

In r301116, a custom lowering needed to be introduced to be able to
legalize 8 and 16-bit divisions on ARM targets without a division
instruction, since 2-step legalization (WidenScalar from 8 bit to 32
bit, then Libcall the 32-bit division) doesn't work.

This fixes this and makes this kind of multi-step legalization, where
first the size of the type needs to be changed and then some action is
needed that doesn't require changing the size of the type,
straighforward to specify.

Differential Revision: https://reviews.llvm.org/D32529

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306806 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
lib/CodeGen/GlobalISel/LegalizerInfo.cpp
lib/Target/ARM/ARMLegalizerInfo.cpp
unittests/CodeGen/GlobalISel/LegalizerInfoTest.cpp