|
2 | 2 | ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu < %s \
|
3 | 3 | ; RUN: -verify-machineinstrs -debug 2>&1 | FileCheck %s
|
4 | 4 |
|
5 |
| -define zeroext i1 @addiCmpiUnsign(i32 zeroext %x) { |
| 5 | +define zeroext i1 @addiCmpiUnsigned(i32 zeroext %x) { |
6 | 6 | entry:
|
7 | 7 | %add = add nuw i32 10, %x
|
8 | 8 | %cmp = icmp ugt i32 %add, 100
|
9 | 9 | ret i1 %cmp
|
10 | 10 |
|
11 |
| -; CHECK: === addiCmpiUnsign |
12 |
| -; CHECK: Optimized lowered selection DAG: %bb.0 'addiCmpiUnsign:entry' |
| 11 | +; CHECK: === addiCmpiUnsigned |
| 12 | +; CHECK: Optimized lowered selection DAG: %bb.0 'addiCmpiUnsigned:entry' |
13 | 13 | ; CHECK: [[REG1:t[0-9]+]]: i32 = truncate {{t[0-9]+}}
|
14 | 14 | ; CHECK: [[REG2:t[0-9]+]]: i32 = add nuw [[REG1]], Constant:i32<10>
|
15 | 15 | ; CHECK: {{t[0-9]+}}: i1 = setcc [[REG2]], Constant:i32<100>, setugt:ch
|
16 | 16 | }
|
17 | 17 |
|
18 |
| -define zeroext i1 @addiCmpiSign(i32 signext %x) { |
| 18 | +define zeroext i1 @addiCmpiSigned(i32 signext %x) { |
19 | 19 | entry:
|
20 | 20 | %add = add nsw i32 16, %x
|
21 | 21 | %cmp = icmp sgt i32 %add, 30
|
22 | 22 | ret i1 %cmp
|
23 | 23 |
|
24 |
| -; CHECK: === addiCmpiSign |
25 |
| -; CHECK: Optimized lowered selection DAG: %bb.0 'addiCmpiSign:entry' |
| 24 | +; CHECK: === addiCmpiSigned |
| 25 | +; CHECK: Optimized lowered selection DAG: %bb.0 'addiCmpiSigned:entry' |
26 | 26 | ; CHECK: [[REG1:t[0-9]+]]: i32 = truncate {{t[0-9]+}}
|
27 | 27 | ; CHECK: [[REG2:t[0-9]+]]: i32 = add nsw [[REG1]], Constant:i32<16>
|
28 | 28 | ; CHECK: {{t[0-9]+}}: i1 = setcc [[REG2]], Constant:i32<30>, setgt:ch
|
29 | 29 | }
|
30 | 30 |
|
31 |
| -define zeroext i1 @addiCmpiUnsignOverflow(i32 zeroext %x) { |
| 31 | +define zeroext i1 @addiCmpiUnsignedOverflow(i32 zeroext %x) { |
32 | 32 | entry:
|
33 | 33 | %add = add nuw i32 110, %x
|
34 | 34 | %cmp = icmp ugt i32 %add, 100
|
35 | 35 | ret i1 %cmp
|
36 | 36 |
|
37 |
| -; CHECK: === addiCmpiUnsignOverflow |
38 |
| -; CHECK: Optimized lowered selection DAG: %bb.0 'addiCmpiUnsignOverflow:entry' |
| 37 | +; CHECK: === addiCmpiUnsignedOverflow |
| 38 | +; CHECK: Optimized lowered selection DAG: %bb.0 'addiCmpiUnsignedOverflow:entry' |
39 | 39 | ; CHECK: [[REG1:t[0-9]+]]: i32 = truncate {{t[0-9]+}}
|
40 | 40 | ; CHECK: [[REG2:t[0-9]+]]: i32 = add nuw [[REG1]], Constant:i32<110>
|
41 | 41 | ; CHECK: {{t[0-9]+}}: i1 = setcc [[REG2]], Constant:i32<100>, setugt:ch
|
42 | 42 | }
|
43 | 43 |
|
44 |
| -define zeroext i1 @addiCmpiSignOverflow(i16 signext %x) { |
| 44 | +define zeroext i1 @addiCmpiSignedOverflow(i16 signext %x) { |
45 | 45 | entry:
|
46 | 46 | %add = add nsw i16 16, %x
|
47 | 47 | %cmp = icmp sgt i16 %add, -32767
|
48 | 48 | ret i1 %cmp
|
49 | 49 |
|
50 |
| -; CHECK: === addiCmpiSignOverflow |
51 |
| -; CHECK: Optimized lowered selection DAG: %bb.0 'addiCmpiSignOverflow:entry' |
| 50 | +; CHECK: === addiCmpiSignedOverflow |
| 51 | +; CHECK: Optimized lowered selection DAG: %bb.0 'addiCmpiSignedOverflow:entry' |
52 | 52 | ; CHECK: [[REG1:t[0-9]+]]: i16 = truncate {{t[0-9]+}}
|
53 | 53 | ; CHECK: [[REG2:t[0-9]+]]: i16 = add nsw [[REG1]], Constant:i16<16>
|
54 | 54 | ; CHECK: {{t[0-9]+}}: i1 = setcc [[REG2]], Constant:i16<-32767>, setgt:ch
|
55 | 55 | }
|
56 | 56 |
|
57 |
| -define zeroext i1 @addiCmpiNE(i16* %d) { |
58 |
| -entry: |
59 |
| - %0 = load i16, i16* %d, align 2 |
60 |
| - %dec = add i16 %0, 100 |
61 |
| - store i16 %dec, i16* %d, align 2 |
62 |
| - %tobool = icmp eq i16 %dec, 40 |
63 |
| - br i1 %tobool, label %land.end, label %land.rhs |
64 |
| - |
65 |
| -land.rhs: |
66 |
| - ret i1 true |
67 |
| - |
68 |
| -land.end: |
69 |
| - ret i1 false |
70 |
| - |
71 |
| -; CHECK: === addiCmpiNE |
72 |
| -; CHECK: Optimized lowered selection DAG: %bb.0 'addiCmpiNE:entry' |
73 |
| -; CHECK: [[REG1:t[0-9]+]]: i16,ch = load |
74 |
| -; CHECK: [[REG2:t[0-9]+]]: i16 = add [[REG1]], Constant:i16<100> |
75 |
| -; CHECK: {{t[0-9]+}}: i1 = setcc [[REG2]], Constant:i16<40>, seteq:ch |
76 |
| -} |
0 commit comments