1 // RUN: llvm-tblgen %s | FileCheck %s
7 // CHECK: bits<8> add = { 0, 0, 0, 1, 1, 0, 0, 0 };
8 // CHECK: bits<8> sub = { 0, 0, 0, 1, 0, 0, 1, 0 };
9 // CHECK: bits<8> and = { 0, 0, 0, 0, 0, 0, 0, 1 };
10 // CHECK: bits<8> or = { 0, 0, 0, 1, 0, 1, 1, 1 };
11 // CHECK: bits<8> xor = { 0, 0, 0, 1, 0, 1, 1, 0 };
12 // CHECK: bits<8> srl = { 0, 0, 0, 0, 0, 0, 1, 0 };
13 // CHECK: bits<8> sra = { 0, 0, 0, 0, 0, 0, 1, 0 };
14 // CHECK: bits<8> shl = { 1, 0, 1, 0, 1, 0, 0, 0 };
16 // CHECK: bits<8> sra = { 1, 1, 1, 1, 1, 1, 1, 1 };
18 class A<bits<8> a, bits<2> b> {
19 // Operands of different bits types are allowed.
20 bits<8> add = !add(a, b);
21 bits<8> sub = !sub(a, b);
22 bits<8> and = !and(a, b);
23 bits<8> or = !or(a, b);
24 bits<8> xor = !xor(a, b);
25 bits<8> srl = !srl(a, b);
26 bits<8> sra = !sra(a, b);
27 bits<8> shl = !shl(a, b);
33 bits<8> sra = !sra(-1, 3);