[InstCombine] Signed saturation patterns
[llvm-complete.git] / unittests / tools / llvm-exegesis / ARM / AssemblerTest.cpp
blob85fafa0c435f4adfe82e85e9b2f00a153b94b524
1 //===-- AssemblerTest.cpp ---------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "../Common/AssemblerUtils.h"
10 #include "ARMInstrInfo.h"
12 namespace llvm {
13 namespace exegesis {
14 namespace {
16 class ARMMachineFunctionGeneratorTest
17 : public MachineFunctionGeneratorBaseTest {
18 protected:
19 ARMMachineFunctionGeneratorTest()
20 : MachineFunctionGeneratorBaseTest("armv7-none-linux-gnueabi", "") {}
22 static void SetUpTestCase() {
23 LLVMInitializeARMTargetInfo();
24 LLVMInitializeARMTargetMC();
25 LLVMInitializeARMTarget();
26 LLVMInitializeARMAsmPrinter();
30 TEST_F(ARMMachineFunctionGeneratorTest, DISABLED_JitFunction) {
31 Check({}, MCInst(), 0x1e, 0xff, 0x2f, 0xe1);
34 TEST_F(ARMMachineFunctionGeneratorTest, DISABLED_JitFunctionADDrr) {
35 Check({{ARM::R0, APInt()}},
36 MCInstBuilder(ARM::ADDrr)
37 .addReg(ARM::R0)
38 .addReg(ARM::R0)
39 .addReg(ARM::R0)
40 .addImm(ARMCC::AL)
41 .addReg(0)
42 .addReg(0),
43 0x00, 0x00, 0x80, 0xe0, 0x1e, 0xff, 0x2f, 0xe1);
46 } // namespace
47 } // namespace exegesis
48 } // namespace llvm