Skip to content

Commit fc3931d

Browse files
committed
[DAG] Moved test to load-combine.ll
1 parent b0dc37e commit fc3931d

File tree

2 files changed

+17
-22
lines changed

2 files changed

+17
-22
lines changed

llvm/test/CodeGen/X86/dagcombine-bswap-to-rotate.ll

Lines changed: 0 additions & 22 deletions
This file was deleted.

llvm/test/CodeGen/X86/load-combine.ll

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,3 +1314,20 @@ define i32 @pr80911_vector_load_multiuse(ptr %ptr, ptr %clobber) nounwind {
13141314
%res = or i32 %e1.ext.shift, %e0.ext
13151315
ret i32 %res
13161316
}
1317+
1318+
define i64 @test_load_bswap_to_rotate(ptr %p) {
1319+
; CHECK64-LABEL: test_load_bswap_to_rotate:
1320+
; CHECK64: # %bb.0:
1321+
; CHECK64-NEXT: movq (%rdi), %rax
1322+
; CHECK64-NEXT: rorq $32, %rax
1323+
; CHECK64-NEXT: retq
1324+
1325+
%p.hi = getelementptr inbounds nuw i8, ptr %p, i64 4
1326+
%lo = load i32, ptr %p
1327+
%hi = load i32, ptr %p.hi
1328+
%conv = zext i32 %lo to i64
1329+
%shl = shl nuw i64 %conv, 32
1330+
%conv2 = zext i32 %hi to i64
1331+
%or = or disjoint i64 %shl, %conv2
1332+
ret i64 %or
1333+
}

0 commit comments

Comments
 (0)