summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/zext-logicop-shift-load.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/zext-logicop-shift-load.ll')
-rw-r--r--llvm/test/CodeGen/X86/zext-logicop-shift-load.ll15
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/X86/zext-logicop-shift-load.ll b/llvm/test/CodeGen/X86/zext-logicop-shift-load.ll
index 40d72243dea..5b8198f009d 100644
--- a/llvm/test/CodeGen/X86/zext-logicop-shift-load.ll
+++ b/llvm/test/CodeGen/X86/zext-logicop-shift-load.ll
@@ -2,11 +2,13 @@
; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
+; FIXME: masked extend should be folded into and.
define i64 @test1(i8* %data) {
; CHECK-LABEL: test1:
; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: movzbl (%rdi), %eax
-; CHECK-NEXT: shlq $2, %rax
+; CHECK-NEXT: movb (%rdi), %al
+; CHECK-NEXT: shlb $2, %al
+; CHECK-NEXT: movzbl %al, %eax
; CHECK-NEXT: andl $60, %eax
; CHECK-NEXT: retq
entry:
@@ -17,12 +19,15 @@ entry:
ret i64 %mul
}
+; FIXME: masked extend should be folded into and.
define i8* @test2(i8* %data) {
; CHECK-LABEL: test2:
; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: movzbl (%rdi), %eax
-; CHECK-NEXT: andl $15, %eax
-; CHECK-NEXT: leaq (%rdi,%rax,4), %rax
+; CHECK-NEXT: movb (%rdi), %al
+; CHECK-NEXT: shlb $2, %al
+; CHECK-NEXT: movzbl %al, %eax
+; CHECK-NEXT: andl $60, %eax
+; CHECK-NEXT: addq %rdi, %rax
; CHECK-NEXT: retq
entry:
%bf.load = load i8, i8* %data, align 4
OpenPOWER on IntegriCloud