summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Molloy <jmolloy@google.com>2019-09-15 08:44:40 +0000
committerJames Molloy <jmolloy@google.com>2019-09-15 08:44:40 +0000
commita088b95f89176b87553d68f3ffbe1f7cba4cefb5 (patch)
treef3f2bbb921ed3082fd5496c03941345e24ed583b
parent60aadd19cbffc3793476a14d2e3529214119e2f5 (diff)
downloadbcm5719-llvm-a088b95f89176b87553d68f3ffbe1f7cba4cefb5.tar.gz
bcm5719-llvm-a088b95f89176b87553d68f3ffbe1f7cba4cefb5.zip
[CodeEmitter] Improve testing for APInt encoding
I missed Artem's comment in D67487 before committing. Differential Revision: https://reviews.llvm.org/D67487 llvm-svn: 371929
-rw-r--r--llvm/test/TableGen/BigEncoder.td17
1 files changed, 7 insertions, 10 deletions
diff --git a/llvm/test/TableGen/BigEncoder.td b/llvm/test/TableGen/BigEncoder.td
index 2841b0d6f0d..56689afb152 100644
--- a/llvm/test/TableGen/BigEncoder.td
+++ b/llvm/test/TableGen/BigEncoder.td
@@ -45,17 +45,8 @@ def biz : Instruction {
field bits<16> SoftFail = 0;
}
-def baz : Instruction {
- let InOperandList = (ins Myi32:$factor);
- field bits<65> Inst;
- bits<32> factor;
- let Inst{7-0} = 0xDD;
- let Inst{15-8} = factor{11-4}; // offset by 4 + custom decode
- let AsmString = "baz $factor";
- field bits<16> SoftFail = 0;
- }
-
}
+
// CHECK-LABEL: case ::biz: {
// CHECK: const APInt [[x:M[0-9]+]] = APInt::getBitsSet(65, 3, 7);
// CHECK-NEXT: Value |= (op & [[x]]) << 9;
@@ -67,3 +58,9 @@ def baz : Instruction {
// CHECK-NEXT: op &= [[x]];
// CHECK-NEXT: op <<= 8;
// CHECK-NEXT: Value |= op;
+
+// CHECK-LABEL: case ::bar: {
+// CHECK: const APInt [[x:M[0-9]+]] = APInt::getBitsSet(65, 3, 11);
+// CHECK-NEXT: op &= [[x]];
+// CHECK-NEXT: op <<= 5;
+// CHECK-NEXT: Value |= op;
OpenPOWER on IntegriCloud