File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
llvm/test/Transforms/CodeGenPrepare/X86 Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -105,5 +105,31 @@ define i1 @fcmp_nan(float %a) {
105
105
ret i1 %fr
106
106
}
107
107
108
+ define void @and (i32 %flag ) {
109
+ ; CHECK-LABEL: @and(
110
+ ; CHECK-NEXT: [[V:%.*]] = and i32 [[FLAG:%.*]], 1
111
+ ; CHECK-NEXT: [[FR:%.*]] = freeze i32 [[V]]
112
+ ; CHECK-NEXT: [[C:%.*]] = icmp eq i32 [[FR]], 0
113
+ ; CHECK-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]]
114
+ ; CHECK: A:
115
+ ; CHECK-NEXT: call void @g1()
116
+ ; CHECK-NEXT: ret void
117
+ ; CHECK: B:
118
+ ; CHECK-NEXT: call void @g2()
119
+ ; CHECK-NEXT: ret void
120
+ ;
121
+ %v = and i32 %flag , 1
122
+ %c = icmp eq i32 %v , 0
123
+ %fr = freeze i1 %c
124
+ br i1 %fr , label %A , label %B
125
+ A:
126
+ call void @g1 ()
127
+ ret void
128
+ B:
129
+ call void @g2 ()
130
+ ret void
131
+ }
132
+
133
+
108
134
declare void @g1 ()
109
135
declare void @g2 ()
You can’t perform that action at this time.
0 commit comments