mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
0830936d52
Update the Programmer's Reference document. Add a test. Update a couple of tests with an improved error message. Differential Revision: https://reviews.llvm.org/D90635
24 lines
434 B
TableGen
24 lines
434 B
TableGen
// RUN: llvm-tblgen %s | FileCheck %s
|
|
// XFAIL: vg_leak
|
|
|
|
// Check that !cond works well with bit conditional values.
|
|
|
|
class A<bit b = true> {
|
|
int a = !cond(b: 5, true : 6);
|
|
bit c = !cond(b: false, true : true);
|
|
bits<1> d = !cond(b: 0, true : 1);
|
|
}
|
|
|
|
// CHECK: def X
|
|
// CHECK: a = 6
|
|
// CHECK: c = 1
|
|
// CHECK: d = { 1 }
|
|
|
|
// CHECK: def Y
|
|
// CHECK: a = 5
|
|
// CHECK: c = 0
|
|
// CHECK: d = { 0 }
|
|
|
|
def X : A<false>;
|
|
def Y : A;
|