| // RUN: llvm-tblgen -print-records %s | FileCheck %s |
| // RUN: not llvm-tblgen -DOOR1 -print-records %s 2>&1 | FileCheck %s --check-prefix=CHECK-OOR |
| // RUN: not llvm-tblgen -DOOR2 -print-records %s 2>&1 | FileCheck %s --check-prefix=CHECK-OOR |
| // RUN: not llvm-tblgen -DOOR3 -print-records %s 2>&1 | FileCheck %s --check-prefix=CHECK-OOR |
| |
| def { |
| |
| #ifdef OOR1 |
| bits<64> Val = -9223372036854775809; |
| #endif |
| |
| #ifdef OOR2 |
| bits<64> Val = 0b10000000000000000000000000000000000000000000000000000000000000000; |
| #endif |
| |
| #ifdef OOR3 |
| bits<64> Val = 0x10000000000000000; |
| #endif |
| // CHECK-OOR: error: number out of range |
| |
| bits<64> BinVal0 = 0x8000000000000000; |
| bits<64> HexVal0 = 0b1000000000000000000000000000000000000000000000000000000000000000; |
| bits<64> DecVal0_0 = 9223372036854775808; |
| bits<64> DecVal0_1 = -9223372036854775808; |
| |
| bits<64> HexVal1 = 0x8000000000000001; |
| bits<64> DecVal1 = 9223372036854775809; |
| |
| // CHECK: bits<64> BinVal0 = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| // CHECK: bits<64> HexVal0 = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| // CHECK: bits<64> DecVal0_0 = { 1, 0, 0, 0, 0, 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