Skip to content

Commit f675775

Browse files
committed
Pre-commit tests (NFC)
1 parent a8280c4 commit f675775

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2+
; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s 2>&1 | FileCheck %s --check-prefix=X86ASM
3+
4+
define i32 @sub_freeze(i32 %x, i32 %y) {
5+
; X86ASM-LABEL: sub_freeze:
6+
; X86ASM: # %bb.0:
7+
; X86ASM-NEXT: xorl %eax, %eax
8+
; X86ASM-NEXT: retq
9+
%a = udiv i32 %x, %y
10+
%b = freeze i32 %a
11+
%c = sub i32 %a, %b
12+
ret i32 %c
13+
}
14+
15+
define i32 @sub_freeze_2(i32 %x, i32 %y) {
16+
; X86ASM-LABEL: sub_freeze_2:
17+
; X86ASM: # %bb.0:
18+
; X86ASM-NEXT: xorl %eax, %eax
19+
; X86ASM-NEXT: retq
20+
%a = add nuw i32 %x, %y
21+
%b = freeze i32 %a
22+
%c = sub i32 %a, %b
23+
ret i32 %c
24+
}
25+
26+
define i32 @xor_freeze(i32 %x, i32 %y) {
27+
; X86ASM-LABEL: xor_freeze:
28+
; X86ASM: # %bb.0:
29+
; X86ASM-NEXT: movl %edi, %eax
30+
; X86ASM-NEXT: xorl %edx, %edx
31+
; X86ASM-NEXT: divl %esi
32+
; X86ASM-NEXT: xorl %eax, %eax
33+
; X86ASM-NEXT: retq
34+
%a = udiv i32 %x, %y
35+
%b = freeze i32 %a
36+
%c = xor i32 %a, %b
37+
ret i32 %c
38+
}
39+
40+
define i32 @xor_freeze_2(i32 %x, i32 %y) {
41+
; X86ASM-LABEL: xor_freeze_2:
42+
; X86ASM: # %bb.0:
43+
; X86ASM-NEXT: xorl %eax, %eax
44+
; X86ASM-NEXT: retq
45+
%a = add nuw i32 %x, %y
46+
%b = freeze i32 %a
47+
%c = xor i32 %a, %b
48+
ret i32 %c
49+
}

0 commit comments

Comments
 (0)