@@ -65,6 +65,7 @@ define void @load_1byte_chunk_of_4byte_alloca_with_zero_upper_half(ptr %src, i64
6565; X64-NO-BMI2-LABEL: load_1byte_chunk_of_4byte_alloca_with_zero_upper_half:
6666; X64-NO-BMI2: # %bb.0:
6767; X64-NO-BMI2-NEXT: movzwl (%rdi), %eax
68+ ; X64-NO-BMI2-NEXT: movzwl %ax, %eax
6869; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx
6970; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx
7071; X64-NO-BMI2-NEXT: shrl %cl, %eax
@@ -74,21 +75,23 @@ define void @load_1byte_chunk_of_4byte_alloca_with_zero_upper_half(ptr %src, i64
7475; X64-BMI2-LABEL: load_1byte_chunk_of_4byte_alloca_with_zero_upper_half:
7576; X64-BMI2: # %bb.0:
7677; X64-BMI2-NEXT: movzwl (%rdi), %eax
78+ ; X64-BMI2-NEXT: movzwl %ax, %eax
7779; X64-BMI2-NEXT: shll $3, %esi
7880; X64-BMI2-NEXT: shrxl %esi, %eax, %eax
7981; X64-BMI2-NEXT: movb %al, (%rdx)
8082; X64-BMI2-NEXT: retq
8183;
8284; X86-NO-BMI2-LABEL: load_1byte_chunk_of_4byte_alloca_with_zero_upper_half:
8385; X86-NO-BMI2: # %bb.0:
84- ; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %edx
85- ; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx
8686; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax
87- ; X86-NO-BMI2-NEXT: movzwl (%eax), %eax
87+ ; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx
88+ ; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %edx
89+ ; X86-NO-BMI2-NEXT: movzwl (%edx), %edx
90+ ; X86-NO-BMI2-NEXT: movzwl %dx, %edx
8891; X86-NO-BMI2-NEXT: shll $3, %ecx
8992; X86-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx
90- ; X86-NO-BMI2-NEXT: shrl %cl, %eax
91- ; X86-NO-BMI2-NEXT: movb %al , (%edx )
93+ ; X86-NO-BMI2-NEXT: shrl %cl, %edx
94+ ; X86-NO-BMI2-NEXT: movb %dl , (%eax )
9295; X86-NO-BMI2-NEXT: retl
9396;
9497; X86-BMI2-LABEL: load_1byte_chunk_of_4byte_alloca_with_zero_upper_half:
@@ -97,6 +100,7 @@ define void @load_1byte_chunk_of_4byte_alloca_with_zero_upper_half(ptr %src, i64
97100; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx
98101; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %edx
99102; X86-BMI2-NEXT: movzwl (%edx), %edx
103+ ; X86-BMI2-NEXT: movzwl %dx, %edx
100104; X86-BMI2-NEXT: shll $3, %ecx
101105; X86-BMI2-NEXT: shrxl %ecx, %edx, %ecx
102106; X86-BMI2-NEXT: movb %cl, (%eax)
@@ -119,6 +123,7 @@ define void @load_2byte_chunk_of_4byte_alloca_with_zero_upper_half(ptr %src, i64
119123; X64-NO-BMI2-LABEL: load_2byte_chunk_of_4byte_alloca_with_zero_upper_half:
120124; X64-NO-BMI2: # %bb.0:
121125; X64-NO-BMI2-NEXT: movzwl (%rdi), %eax
126+ ; X64-NO-BMI2-NEXT: movzwl %ax, %eax
122127; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx
123128; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx
124129; X64-NO-BMI2-NEXT: shrl %cl, %eax
@@ -128,6 +133,7 @@ define void @load_2byte_chunk_of_4byte_alloca_with_zero_upper_half(ptr %src, i64
128133; X64-BMI2-LABEL: load_2byte_chunk_of_4byte_alloca_with_zero_upper_half:
129134; X64-BMI2: # %bb.0:
130135; X64-BMI2-NEXT: movzwl (%rdi), %eax
136+ ; X64-BMI2-NEXT: movzwl %ax, %eax
131137; X64-BMI2-NEXT: shll $3, %esi
132138; X64-BMI2-NEXT: shrxl %esi, %eax, %eax
133139; X64-BMI2-NEXT: movw %ax, (%rdx)
@@ -139,6 +145,7 @@ define void @load_2byte_chunk_of_4byte_alloca_with_zero_upper_half(ptr %src, i64
139145; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx
140146; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %edx
141147; X86-NO-BMI2-NEXT: movzwl (%edx), %edx
148+ ; X86-NO-BMI2-NEXT: movzwl %dx, %edx
142149; X86-NO-BMI2-NEXT: shll $3, %ecx
143150; X86-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx
144151; X86-NO-BMI2-NEXT: shrl %cl, %edx
@@ -151,6 +158,7 @@ define void @load_2byte_chunk_of_4byte_alloca_with_zero_upper_half(ptr %src, i64
151158; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx
152159; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %edx
153160; X86-BMI2-NEXT: movzwl (%edx), %edx
161+ ; X86-BMI2-NEXT: movzwl %dx, %edx
154162; X86-BMI2-NEXT: shll $3, %ecx
155163; X86-BMI2-NEXT: shrxl %ecx, %edx, %ecx
156164; X86-BMI2-NEXT: movw %cx, (%eax)
0 commit comments