Skip to content

Commit ca9f68e

Browse files
committed
[NFC][PowerPC] Modify the test case add_cmp.ll
llvm-svn: 366526
1 parent c12f299 commit ca9f68e

File tree

1 file changed

+12
-32
lines changed

1 file changed

+12
-32
lines changed

llvm/test/CodeGen/PowerPC/add_cmp.ll

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,75 +2,55 @@
22
; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu < %s \
33
; RUN: -verify-machineinstrs -debug 2>&1 | FileCheck %s
44

5-
define zeroext i1 @addiCmpiUnsign(i32 zeroext %x) {
5+
define zeroext i1 @addiCmpiUnsigned(i32 zeroext %x) {
66
entry:
77
%add = add nuw i32 10, %x
88
%cmp = icmp ugt i32 %add, 100
99
ret i1 %cmp
1010

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'
1313
; CHECK: [[REG1:t[0-9]+]]: i32 = truncate {{t[0-9]+}}
1414
; CHECK: [[REG2:t[0-9]+]]: i32 = add nuw [[REG1]], Constant:i32<10>
1515
; CHECK: {{t[0-9]+}}: i1 = setcc [[REG2]], Constant:i32<100>, setugt:ch
1616
}
1717

18-
define zeroext i1 @addiCmpiSign(i32 signext %x) {
18+
define zeroext i1 @addiCmpiSigned(i32 signext %x) {
1919
entry:
2020
%add = add nsw i32 16, %x
2121
%cmp = icmp sgt i32 %add, 30
2222
ret i1 %cmp
2323

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'
2626
; CHECK: [[REG1:t[0-9]+]]: i32 = truncate {{t[0-9]+}}
2727
; CHECK: [[REG2:t[0-9]+]]: i32 = add nsw [[REG1]], Constant:i32<16>
2828
; CHECK: {{t[0-9]+}}: i1 = setcc [[REG2]], Constant:i32<30>, setgt:ch
2929
}
3030

31-
define zeroext i1 @addiCmpiUnsignOverflow(i32 zeroext %x) {
31+
define zeroext i1 @addiCmpiUnsignedOverflow(i32 zeroext %x) {
3232
entry:
3333
%add = add nuw i32 110, %x
3434
%cmp = icmp ugt i32 %add, 100
3535
ret i1 %cmp
3636

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'
3939
; CHECK: [[REG1:t[0-9]+]]: i32 = truncate {{t[0-9]+}}
4040
; CHECK: [[REG2:t[0-9]+]]: i32 = add nuw [[REG1]], Constant:i32<110>
4141
; CHECK: {{t[0-9]+}}: i1 = setcc [[REG2]], Constant:i32<100>, setugt:ch
4242
}
4343

44-
define zeroext i1 @addiCmpiSignOverflow(i16 signext %x) {
44+
define zeroext i1 @addiCmpiSignedOverflow(i16 signext %x) {
4545
entry:
4646
%add = add nsw i16 16, %x
4747
%cmp = icmp sgt i16 %add, -32767
4848
ret i1 %cmp
4949

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'
5252
; CHECK: [[REG1:t[0-9]+]]: i16 = truncate {{t[0-9]+}}
5353
; CHECK: [[REG2:t[0-9]+]]: i16 = add nsw [[REG1]], Constant:i16<16>
5454
; CHECK: {{t[0-9]+}}: i1 = setcc [[REG2]], Constant:i16<-32767>, setgt:ch
5555
}
5656

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

Comments
 (0)