aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/store-narrow.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/store-narrow.ll')
-rw-r--r--test/CodeGen/X86/store-narrow.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/X86/store-narrow.ll b/test/CodeGen/X86/store-narrow.ll
index f47bf31..a656697 100644
--- a/test/CodeGen/X86/store-narrow.ll
+++ b/test/CodeGen/X86/store-narrow.ll
@@ -105,3 +105,23 @@ entry:
; X32: movb 8(%esp), %al
; X32: movb %al, 5(%{{.*}})
}
+
+define i32 @test7(i64* nocapture %a0, i8 zeroext %a1, i32* %P2) nounwind {
+entry:
+ %OtherLoad = load i32 *%P2
+ %A = load i64* %a0, align 4
+ %B = and i64 %A, -280375465082881 ; 0xFFFF00FFFFFFFFFF
+ %C = zext i8 %a1 to i64
+ %CS = shl i64 %C, 40
+ %D = or i64 %B, %CS
+ store i64 %D, i64* %a0, align 4
+ ret i32 %OtherLoad
+; X64: test7:
+; X64: movb %sil, 5(%rdi)
+
+
+; X32: test7:
+; X32: movb 8(%esp), %cl
+; X32: movb %cl, 5(%{{.*}})
+}
+