@@ -133,14 +133,12 @@ entry:
133133define i16 @and16ri8 (i16 noundef %a ) {
134134; CHECK-LABEL: and16ri8:
135135; CHECK: # %bb.0: # %entry
136- ; CHECK-NEXT: andl $123, %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0x83,0xe7,0x7b]
137- ; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
136+ ; CHECK-NEXT: andw $123, %di, %ax # encoding: [0x62,0xf4,0x7d,0x18,0x83,0xe7,0x7b]
138137; CHECK-NEXT: retq # encoding: [0xc3]
139138;
140139; NF-LABEL: and16ri8:
141140; NF: # %bb.0: # %entry
142- ; NF-NEXT: {nf} andl $123, %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x83,0xe7,0x7b]
143- ; NF-NEXT: # kill: def $ax killed $ax killed $eax
141+ ; NF-NEXT: {nf} andw $123, %di, %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0x83,0xe7,0x7b]
144142; NF-NEXT: retq # encoding: [0xc3]
145143entry:
146144 %and = and i16 %a , 123
@@ -195,16 +193,14 @@ entry:
195193define i16 @and16ri (i16 noundef %a ) {
196194; CHECK-LABEL: and16ri:
197195; CHECK: # %bb.0: # %entry
198- ; CHECK-NEXT: andl $1234, %edi , %eax # encoding: [0x62,0xf4,0x7c ,0x18,0x81,0xe7,0xd2,0x04,0x00,0x00 ]
196+ ; CHECK-NEXT: andw $1234, %di , %ax # encoding: [0x62,0xf4,0x7d ,0x18,0x81,0xe7,0xd2,0x04]
199197; CHECK-NEXT: # imm = 0x4D2
200- ; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
201198; CHECK-NEXT: retq # encoding: [0xc3]
202199;
203200; NF-LABEL: and16ri:
204201; NF: # %bb.0: # %entry
205- ; NF-NEXT: {nf} andl $1234, %edi , %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c ,0x1c,0x81,0xe7,0xd2,0x04,0x00,0x00 ]
202+ ; NF-NEXT: {nf} andw $1234, %di , %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d ,0x1c,0x81,0xe7,0xd2,0x04]
206203; NF-NEXT: # imm = 0x4D2
207- ; NF-NEXT: # kill: def $ax killed $ax killed $eax
208204; NF-NEXT: retq # encoding: [0xc3]
209205entry:
210206 %and = and i16 %a , 1234
@@ -312,16 +308,12 @@ entry:
312308define i16 @and16mi8 (ptr %a ) {
313309; CHECK-LABEL: and16mi8:
314310; CHECK: # %bb.0: # %entry
315- ; CHECK-NEXT: movzwl (%rdi), %eax # encoding: [0x0f,0xb7,0x07]
316- ; CHECK-NEXT: andl $123, %eax # EVEX TO LEGACY Compression encoding: [0x83,0xe0,0x7b]
317- ; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
311+ ; CHECK-NEXT: andw $123, (%rdi), %ax # encoding: [0x62,0xf4,0x7d,0x18,0x83,0x27,0x7b]
318312; CHECK-NEXT: retq # encoding: [0xc3]
319313;
320314; NF-LABEL: and16mi8:
321315; NF: # %bb.0: # %entry
322- ; NF-NEXT: movzwl (%rdi), %eax # encoding: [0x0f,0xb7,0x07]
323- ; NF-NEXT: andl $123, %eax # EVEX TO LEGACY Compression encoding: [0x83,0xe0,0x7b]
324- ; NF-NEXT: # kill: def $ax killed $ax killed $eax
316+ ; NF-NEXT: {nf} andw $123, (%rdi), %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0x83,0x27,0x7b]
325317; NF-NEXT: retq # encoding: [0xc3]
326318entry:
327319 %t = load i16 , ptr %a
@@ -382,18 +374,14 @@ entry:
382374define i16 @and16mi (ptr %a ) {
383375; CHECK-LABEL: and16mi:
384376; CHECK: # %bb.0: # %entry
385- ; CHECK-NEXT: movzwl (%rdi), %eax # encoding: [0x0f,0xb7,0x07]
386- ; CHECK-NEXT: andl $1234, %eax # EVEX TO LEGACY Compression encoding: [0x25,0xd2,0x04,0x00,0x00]
377+ ; CHECK-NEXT: andw $1234, (%rdi), %ax # encoding: [0x62,0xf4,0x7d,0x18,0x81,0x27,0xd2,0x04]
387378; CHECK-NEXT: # imm = 0x4D2
388- ; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
389379; CHECK-NEXT: retq # encoding: [0xc3]
390380;
391381; NF-LABEL: and16mi:
392382; NF: # %bb.0: # %entry
393- ; NF-NEXT: movzwl (%rdi), %eax # encoding: [0x0f,0xb7,0x07]
394- ; NF-NEXT: andl $1234, %eax # EVEX TO LEGACY Compression encoding: [0x25,0xd2,0x04,0x00,0x00]
383+ ; NF-NEXT: {nf} andw $1234, (%rdi), %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0x81,0x27,0xd2,0x04]
395384; NF-NEXT: # imm = 0x4D2
396- ; NF-NEXT: # kill: def $ax killed $ax killed $eax
397385; NF-NEXT: retq # encoding: [0xc3]
398386entry:
399387 %t = load i16 , ptr %a
@@ -469,7 +457,7 @@ define i1 @andflag8rr(i8 %a, i8 %b) {
469457define i1 @andflag16rr (i16 %a , i16 %b ) {
470458; CHECK-LABEL: andflag16rr:
471459; CHECK: # %bb.0:
472- ; CHECK-NEXT: notl %esi , %eax # encoding: [0x62,0xf4,0x7c ,0x18,0xf7,0xd6]
460+ ; CHECK-NEXT: notw %si , %ax # encoding: [0x62,0xf4,0x7d ,0x18,0xf7,0xd6]
473461; CHECK-NEXT: andw %ax, %di, %cx # encoding: [0x62,0xf4,0x75,0x18,0x21,0xc7]
474462; CHECK-NEXT: sete %al # encoding: [0x0f,0x94,0xc0]
475463; CHECK-NEXT: movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]
@@ -478,7 +466,7 @@ define i1 @andflag16rr(i16 %a, i16 %b) {
478466;
479467; NF-LABEL: andflag16rr:
480468; NF: # %bb.0:
481- ; NF-NEXT: notl %esi , %eax # encoding: [0x62,0xf4,0x7c ,0x18,0xf7,0xd6]
469+ ; NF-NEXT: notw %si , %ax # encoding: [0x62,0xf4,0x7d ,0x18,0xf7,0xd6]
482470; NF-NEXT: andw %ax, %di, %cx # encoding: [0x62,0xf4,0x75,0x18,0x21,0xc7]
483471; NF-NEXT: sete %al # encoding: [0x0f,0x94,0xc0]
484472; NF-NEXT: movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]
@@ -564,7 +552,7 @@ define i1 @andflag8rm(ptr %ptr, i8 %b) {
564552define i1 @andflag16rm (ptr %ptr , i16 %b ) {
565553; CHECK-LABEL: andflag16rm:
566554; CHECK: # %bb.0:
567- ; CHECK-NEXT: notl %esi , %eax # encoding: [0x62,0xf4,0x7c ,0x18,0xf7,0xd6]
555+ ; CHECK-NEXT: notw %si , %ax # encoding: [0x62,0xf4,0x7d ,0x18,0xf7,0xd6]
568556; CHECK-NEXT: andw (%rdi), %ax, %cx # encoding: [0x62,0xf4,0x75,0x18,0x23,0x07]
569557; CHECK-NEXT: sete %al # encoding: [0x0f,0x94,0xc0]
570558; CHECK-NEXT: movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]
@@ -573,7 +561,7 @@ define i1 @andflag16rm(ptr %ptr, i16 %b) {
573561;
574562; NF-LABEL: andflag16rm:
575563; NF: # %bb.0:
576- ; NF-NEXT: notl %esi , %eax # encoding: [0x62,0xf4,0x7c ,0x18,0xf7,0xd6]
564+ ; NF-NEXT: notw %si , %ax # encoding: [0x62,0xf4,0x7d ,0x18,0xf7,0xd6]
577565; NF-NEXT: andw (%rdi), %ax, %cx # encoding: [0x62,0xf4,0x75,0x18,0x23,0x07]
578566; NF-NEXT: sete %al # encoding: [0x0f,0x94,0xc0]
579567; NF-NEXT: movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]
0 commit comments