diff options
Diffstat (limited to 'test/CodeGen/X86/GlobalISel/memop-scalar-x32.ll')
-rw-r--r-- | test/CodeGen/X86/GlobalISel/memop-scalar-x32.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/X86/GlobalISel/memop-scalar-x32.ll b/test/CodeGen/X86/GlobalISel/memop-scalar-x32.ll index 2757e6493258..1c719b1bf74d 100644 --- a/test/CodeGen/X86/GlobalISel/memop-scalar-x32.ll +++ b/test/CodeGen/X86/GlobalISel/memop-scalar-x32.ll @@ -4,6 +4,16 @@ ;TODO merge with x86-64 tests (many operations not suppored yet) +define i1 @test_load_i1(i1 * %p1) { +; ALL-LABEL: test_load_i1: +; ALL: # BB#0: +; ALL-NEXT: movl 4(%esp), %eax +; ALL-NEXT: movb (%eax), %al +; ALL-NEXT: retl + %r = load i1, i1* %p1 + ret i1 %r +} + define i8 @test_load_i8(i8 * %p1) { ; ALL-LABEL: test_load_i8: ; ALL: # BB#0: @@ -34,6 +44,18 @@ define i32 @test_load_i32(i32 * %p1) { ret i32 %r } +define i1 * @test_store_i1(i1 %val, i1 * %p1) { +; ALL-LABEL: test_store_i1: +; ALL: # BB#0: +; ALL-NEXT: movb 4(%esp), %cl +; ALL-NEXT: movl 8(%esp), %eax +; ALL-NEXT: andb $1, %cl +; ALL-NEXT: movb %cl, (%eax) +; ALL-NEXT: retl + store i1 %val, i1* %p1 + ret i1 * %p1; +} + define i8 * @test_store_i8(i8 %val, i8 * %p1) { ; ALL-LABEL: test_store_i8: ; ALL: # BB#0: |