[InstCombine] Signed saturation patterns
[llvm-core.git] / test / TableGen / cond-subclass.td
blob9f6f6e2cb8cc6d3bcfcf418581eae6384f49c13b
1 // Check that !cond with operands of different subtypes can
2 // initialize a supertype variable.
3 // RUN: llvm-tblgen %s | FileCheck %s
4 // XFAIL: vg_leak
6 class E<int dummy> {}
7 class E1<int dummy> : E<dummy> {}
8 class E2<int dummy> : E<dummy> {}
10 class EX<int cc, E1 b, E2 c> {
11   E x = !cond(cc: b, 1 : c);
14 def E1d : E1<0>;
15 def E2d : E2<0>;
17 def EXd1 : EX<1, E1d, E2d>;
18 def EXd2 : EX<0, E1d, E2d>;
20 // CHECK: def EXd1 {
21 // CHECK:   E x = E1d;
22 // CHECK: }
24 // CHECK: def EXd2 {
25 // CHECK:   E x = E2d;
26 // CHECK: }