diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
commit | e6d1592492a3a379186bfb02bd0f4eda0669c0d5 (patch) | |
tree | 599ab169a01f1c86eda9adc774edaedde2f2db5b /lib/Target/X86/X86LegalizerInfo.cpp | |
parent | 1a56a5ead7a2e84bee8240f5f6b033b5f1707154 (diff) | |
download | src-test2-e6d1592492a3a379186bfb02bd0f4eda0669c0d5.tar.gz src-test2-e6d1592492a3a379186bfb02bd0f4eda0669c0d5.zip |
Notes
Diffstat (limited to 'lib/Target/X86/X86LegalizerInfo.cpp')
-rw-r--r-- | lib/Target/X86/X86LegalizerInfo.cpp | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/lib/Target/X86/X86LegalizerInfo.cpp b/lib/Target/X86/X86LegalizerInfo.cpp index 4a49fa68dd06..00fb1b573858 100644 --- a/lib/Target/X86/X86LegalizerInfo.cpp +++ b/lib/Target/X86/X86LegalizerInfo.cpp @@ -1,9 +1,8 @@ //===- X86LegalizerInfo.cpp --------------------------------------*- C++ -*-==// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// \file @@ -134,9 +133,15 @@ void X86LegalizerInfo::setLegalizerInfo32bit() { // Shifts and SDIV getActionDefinitionsBuilder( - {G_SHL, G_LSHR, G_ASHR, G_SDIV, G_SREM, G_UDIV, G_UREM}) - .legalFor({s8, s16, s32}) - .clampScalar(0, s8, s32); + {G_SDIV, G_SREM, G_UDIV, G_UREM}) + .legalFor({s8, s16, s32}) + .clampScalar(0, s8, s32); + + getActionDefinitionsBuilder( + {G_SHL, G_LSHR, G_ASHR}) + .legalFor({{s8, s8}, {s16, s8}, {s32, s8}}) + .clampScalar(0, s8, s32) + .clampScalar(1, s8, s8); } // Control-flow @@ -236,12 +241,19 @@ void X86LegalizerInfo::setLegalizerInfo64bit() { .clampScalar(1, s32, s64) .widenScalarToNextPow2(1); - // Shifts and SDIV + // Divisions getActionDefinitionsBuilder( - {G_SHL, G_LSHR, G_ASHR, G_SDIV, G_SREM, G_UDIV, G_UREM}) + {G_SDIV, G_SREM, G_UDIV, G_UREM}) .legalFor({s8, s16, s32, s64}) .clampScalar(0, s8, s64); + // Shifts + getActionDefinitionsBuilder( + {G_SHL, G_LSHR, G_ASHR}) + .legalFor({{s8, s8}, {s16, s8}, {s32, s8}, {s64, s8}}) + .clampScalar(0, s8, s64) + .clampScalar(1, s8, s8); + // Merge/Unmerge setAction({G_MERGE_VALUES, s128}, Legal); setAction({G_UNMERGE_VALUES, 1, s128}, Legal); |