We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bab9724 commit 1717084Copy full SHA for 1717084
test/CodeGen/X86/shift-and.ll
@@ -193,3 +193,24 @@ define i64 @t6(i64 %key, i64* nocapture %val) nounwind {
193
%and = and i64 %sub, %shr
194
ret i64 %and
195
}
196
+
197
+define i64 @big_mask_constant(i64 %x) nounwind {
198
+; X32-LABEL: big_mask_constant:
199
+; X32: # BB#0:
200
+; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
201
+; X32-NEXT: andl $4, %eax
202
+; X32-NEXT: shll $25, %eax
203
+; X32-NEXT: xorl %edx, %edx
204
+; X32-NEXT: retl
205
+;
206
+; X64-LABEL: big_mask_constant:
207
+; X64: # BB#0:
208
+; X64-NEXT: movabsq $17179869184, %rax # imm = 0x400000000
209
+; X64-NEXT: andq %rdi, %rax
210
+; X64-NEXT: shrq $7, %rax
211
+; X64-NEXT: retq
212
+ %and = and i64 %x, 17179869184 ; 0x400000000
213
+ %sh = lshr i64 %and, 7
214
+ ret i64 %sh
215
+}
216
0 commit comments