File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments