801 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+ndd -verify-machineinstrs --show-mc-encoding | FileCheck %s3; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+ndd,nf -verify-machineinstrs --show-mc-encoding | FileCheck --check-prefix=NF %s4; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+ndd,nf -x86-enable-apx-for-relocation=true -verify-machineinstrs --show-mc-encoding | FileCheck --check-prefix=NF %s5 6define i8 @shl8ri(i8 noundef %a) {7; CHECK-LABEL: shl8ri:8; CHECK: # %bb.0: # %entry9; CHECK-NEXT: shlb $4, %dil, %al # encoding: [0x62,0xf4,0x7c,0x18,0xc0,0xe7,0x04]10; CHECK-NEXT: retq # encoding: [0xc3]11;12; NF-LABEL: shl8ri:13; NF: # %bb.0: # %entry14; NF-NEXT: {nf} shlb $4, %dil, %al # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xc0,0xe7,0x04]15; NF-NEXT: retq # encoding: [0xc3]16entry:17 %shl = shl i8 %a, 418 ret i8 %shl19}20 21define i16 @shl16ri(i16 noundef %a) {22; CHECK-LABEL: shl16ri:23; CHECK: # %bb.0: # %entry24; CHECK-NEXT: shlw $4, %di, %ax # encoding: [0x62,0xf4,0x7d,0x18,0xc1,0xe7,0x04]25; CHECK-NEXT: retq # encoding: [0xc3]26;27; NF-LABEL: shl16ri:28; NF: # %bb.0: # %entry29; NF-NEXT: {nf} shlw $4, %di, %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0xc1,0xe7,0x04]30; NF-NEXT: retq # encoding: [0xc3]31entry:32 %shl = shl i16 %a, 433 ret i16 %shl34}35 36define i32 @shl32ri(i32 noundef %a) {37; CHECK-LABEL: shl32ri:38; CHECK: # %bb.0: # %entry39; CHECK-NEXT: shll $4, %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0xc1,0xe7,0x04]40; CHECK-NEXT: retq # encoding: [0xc3]41;42; NF-LABEL: shl32ri:43; NF: # %bb.0: # %entry44; NF-NEXT: {nf} shll $4, %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xc1,0xe7,0x04]45; NF-NEXT: retq # encoding: [0xc3]46entry:47 %shl = shl i32 %a, 448 ret i32 %shl49}50 51define i64 @shl64ri(i64 noundef %a) {52; CHECK-LABEL: shl64ri:53; CHECK: # %bb.0: # %entry54; CHECK-NEXT: shlq $4, %rdi, %rax # encoding: [0x62,0xf4,0xfc,0x18,0xc1,0xe7,0x04]55; CHECK-NEXT: retq # encoding: [0xc3]56;57; NF-LABEL: shl64ri:58; NF: # %bb.0: # %entry59; NF-NEXT: {nf} shlq $4, %rdi, %rax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0xfc,0x1c,0xc1,0xe7,0x04]60; NF-NEXT: retq # encoding: [0xc3]61entry:62 %shl = shl i64 %a, 463 ret i64 %shl64}65 66define i8 @shl8m1(ptr %ptr) {67; CHECK-LABEL: shl8m1:68; CHECK: # %bb.0: # %entry69; CHECK-NEXT: movzbl (%rdi), %eax # encoding: [0x0f,0xb6,0x07]70; CHECK-NEXT: addb %al, %al # EVEX TO LEGACY Compression encoding: [0x00,0xc0]71; CHECK-NEXT: retq # encoding: [0xc3]72;73; NF-LABEL: shl8m1:74; NF: # %bb.0: # %entry75; NF-NEXT: movzbl (%rdi), %eax # encoding: [0x0f,0xb6,0x07]76; NF-NEXT: addb %al, %al # EVEX TO LEGACY Compression encoding: [0x00,0xc0]77; NF-NEXT: retq # encoding: [0xc3]78entry:79 %a = load i8, ptr %ptr80 %shl = shl i8 %a, 181 ret i8 %shl82}83 84define i16 @shl16m1(ptr %ptr) {85; CHECK-LABEL: shl16m1:86; CHECK: # %bb.0: # %entry87; CHECK-NEXT: movzwl (%rdi), %eax # encoding: [0x0f,0xb7,0x07]88; CHECK-NEXT: addw %ax, %ax # EVEX TO LEGACY Compression encoding: [0x66,0x01,0xc0]89; CHECK-NEXT: retq # encoding: [0xc3]90;91; NF-LABEL: shl16m1:92; NF: # %bb.0: # %entry93; NF-NEXT: movzwl (%rdi), %eax # encoding: [0x0f,0xb7,0x07]94; NF-NEXT: addw %ax, %ax # EVEX TO LEGACY Compression encoding: [0x66,0x01,0xc0]95; NF-NEXT: retq # encoding: [0xc3]96entry:97 %a = load i16, ptr %ptr98 %shl = shl i16 %a, 199 ret i16 %shl100}101 102define i32 @shl32m1(ptr %ptr) {103; CHECK-LABEL: shl32m1:104; CHECK: # %bb.0: # %entry105; CHECK-NEXT: movl (%rdi), %eax # encoding: [0x8b,0x07]106; CHECK-NEXT: addl %eax, %eax # EVEX TO LEGACY Compression encoding: [0x01,0xc0]107; CHECK-NEXT: retq # encoding: [0xc3]108;109; NF-LABEL: shl32m1:110; NF: # %bb.0: # %entry111; NF-NEXT: movl (%rdi), %eax # encoding: [0x8b,0x07]112; NF-NEXT: addl %eax, %eax # EVEX TO LEGACY Compression encoding: [0x01,0xc0]113; NF-NEXT: retq # encoding: [0xc3]114entry:115 %a = load i32, ptr %ptr116 %shl = shl i32 %a, 1117 ret i32 %shl118}119 120define i64 @shl64m1(ptr %ptr) {121; CHECK-LABEL: shl64m1:122; CHECK: # %bb.0: # %entry123; CHECK-NEXT: movq (%rdi), %rax # encoding: [0x48,0x8b,0x07]124; CHECK-NEXT: addq %rax, %rax # EVEX TO LEGACY Compression encoding: [0x48,0x01,0xc0]125; CHECK-NEXT: retq # encoding: [0xc3]126;127; NF-LABEL: shl64m1:128; NF: # %bb.0: # %entry129; NF-NEXT: movq (%rdi), %rax # encoding: [0x48,0x8b,0x07]130; NF-NEXT: addq %rax, %rax # EVEX TO LEGACY Compression encoding: [0x48,0x01,0xc0]131; NF-NEXT: retq # encoding: [0xc3]132entry:133 %a = load i64, ptr %ptr134 %shl = shl i64 %a, 1135 ret i64 %shl136}137 138define i8 @shl8mcl(ptr %ptr, i8 %cl) {139; CHECK-LABEL: shl8mcl:140; CHECK: # %bb.0: # %entry141; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]142; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx143; CHECK-NEXT: shlb %cl, (%rdi), %al # encoding: [0x62,0xf4,0x7c,0x18,0xd2,0x27]144; CHECK-NEXT: retq # encoding: [0xc3]145;146; NF-LABEL: shl8mcl:147; NF: # %bb.0: # %entry148; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]149; NF-NEXT: # kill: def $cl killed $cl killed $ecx150; NF-NEXT: {nf} shlb %cl, (%rdi), %al # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xd2,0x27]151; NF-NEXT: retq # encoding: [0xc3]152entry:153 %a = load i8, ptr %ptr154 %shl = shl i8 %a, %cl155 ret i8 %shl156}157 158define i8 @shl8mcl_mask(ptr %ptr, i8 %cl) {159; CHECK-LABEL: shl8mcl_mask:160; CHECK: # %bb.0: # %entry161; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]162; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx163; CHECK-NEXT: shlb %cl, (%rdi), %al # encoding: [0x62,0xf4,0x7c,0x18,0xd2,0x27]164; CHECK-NEXT: retq # encoding: [0xc3]165;166; NF-LABEL: shl8mcl_mask:167; NF: # %bb.0: # %entry168; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]169; NF-NEXT: # kill: def $cl killed $cl killed $ecx170; NF-NEXT: {nf} shlb %cl, (%rdi), %al # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xd2,0x27]171; NF-NEXT: retq # encoding: [0xc3]172entry:173 %a = load i8, ptr %ptr174 %shamt = and i8 %cl, 31175 %shl = shl i8 %a, %shamt176 ret i8 %shl177}178 179define i16 @shl16mcl(ptr %ptr, i16 %cl) {180; CHECK-LABEL: shl16mcl:181; CHECK: # %bb.0: # %entry182; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]183; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx184; CHECK-NEXT: shlw %cl, (%rdi), %ax # encoding: [0x62,0xf4,0x7d,0x18,0xd3,0x27]185; CHECK-NEXT: retq # encoding: [0xc3]186;187; NF-LABEL: shl16mcl:188; NF: # %bb.0: # %entry189; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]190; NF-NEXT: # kill: def $cl killed $cl killed $ecx191; NF-NEXT: {nf} shlw %cl, (%rdi), %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0xd3,0x27]192; NF-NEXT: retq # encoding: [0xc3]193entry:194 %a = load i16, ptr %ptr195 %shl = shl i16 %a, %cl196 ret i16 %shl197}198 199define i16 @shl16mcl_mask(ptr %ptr, i16 %cl) {200; CHECK-LABEL: shl16mcl_mask:201; CHECK: # %bb.0: # %entry202; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]203; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx204; CHECK-NEXT: shlw %cl, (%rdi), %ax # encoding: [0x62,0xf4,0x7d,0x18,0xd3,0x27]205; CHECK-NEXT: retq # encoding: [0xc3]206;207; NF-LABEL: shl16mcl_mask:208; NF: # %bb.0: # %entry209; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]210; NF-NEXT: # kill: def $cl killed $cl killed $ecx211; NF-NEXT: {nf} shlw %cl, (%rdi), %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0xd3,0x27]212; NF-NEXT: retq # encoding: [0xc3]213entry:214 %a = load i16, ptr %ptr215 %shamt = and i16 %cl, 31216 %shl = shl i16 %a, %shamt217 ret i16 %shl218}219 220define i32 @shl32mcl(ptr %ptr, i32 %cl) {221; CHECK-LABEL: shl32mcl:222; CHECK: # %bb.0: # %entry223; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]224; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx225; CHECK-NEXT: shll %cl, (%rdi), %eax # encoding: [0x62,0xf4,0x7c,0x18,0xd3,0x27]226; CHECK-NEXT: retq # encoding: [0xc3]227;228; NF-LABEL: shl32mcl:229; NF: # %bb.0: # %entry230; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]231; NF-NEXT: # kill: def $cl killed $cl killed $ecx232; NF-NEXT: {nf} shll %cl, (%rdi), %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xd3,0x27]233; NF-NEXT: retq # encoding: [0xc3]234entry:235 %a = load i32, ptr %ptr236 %shl = shl i32 %a, %cl237 ret i32 %shl238}239 240define i32 @shl32mcl_mask(ptr %ptr, i32 %cl) {241; CHECK-LABEL: shl32mcl_mask:242; CHECK: # %bb.0: # %entry243; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]244; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx245; CHECK-NEXT: shll %cl, (%rdi), %eax # encoding: [0x62,0xf4,0x7c,0x18,0xd3,0x27]246; CHECK-NEXT: retq # encoding: [0xc3]247;248; NF-LABEL: shl32mcl_mask:249; NF: # %bb.0: # %entry250; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]251; NF-NEXT: # kill: def $cl killed $cl killed $ecx252; NF-NEXT: {nf} shll %cl, (%rdi), %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xd3,0x27]253; NF-NEXT: retq # encoding: [0xc3]254entry:255 %a = load i32, ptr %ptr256 %shamt = and i32 %cl, 31257 %shl = shl i32 %a, %shamt258 ret i32 %shl259}260 261define i64 @shl64mcl(ptr %ptr, i64 %cl) {262; CHECK-LABEL: shl64mcl:263; CHECK: # %bb.0: # %entry264; CHECK-NEXT: movq %rsi, %rcx # encoding: [0x48,0x89,0xf1]265; CHECK-NEXT: # kill: def $cl killed $cl killed $rcx266; CHECK-NEXT: shlq %cl, (%rdi), %rax # encoding: [0x62,0xf4,0xfc,0x18,0xd3,0x27]267; CHECK-NEXT: retq # encoding: [0xc3]268;269; NF-LABEL: shl64mcl:270; NF: # %bb.0: # %entry271; NF-NEXT: movq %rsi, %rcx # encoding: [0x48,0x89,0xf1]272; NF-NEXT: # kill: def $cl killed $cl killed $rcx273; NF-NEXT: {nf} shlq %cl, (%rdi), %rax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0xfc,0x1c,0xd3,0x27]274; NF-NEXT: retq # encoding: [0xc3]275entry:276 %a = load i64, ptr %ptr277 %shl = shl i64 %a, %cl278 ret i64 %shl279}280 281define i64 @shl64mcl_mask(ptr %ptr, i64 %cl) {282; CHECK-LABEL: shl64mcl_mask:283; CHECK: # %bb.0: # %entry284; CHECK-NEXT: movq %rsi, %rcx # encoding: [0x48,0x89,0xf1]285; CHECK-NEXT: # kill: def $cl killed $cl killed $rcx286; CHECK-NEXT: shlq %cl, (%rdi), %rax # encoding: [0x62,0xf4,0xfc,0x18,0xd3,0x27]287; CHECK-NEXT: retq # encoding: [0xc3]288;289; NF-LABEL: shl64mcl_mask:290; NF: # %bb.0: # %entry291; NF-NEXT: movq %rsi, %rcx # encoding: [0x48,0x89,0xf1]292; NF-NEXT: # kill: def $cl killed $cl killed $rcx293; NF-NEXT: {nf} shlq %cl, (%rdi), %rax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0xfc,0x1c,0xd3,0x27]294; NF-NEXT: retq # encoding: [0xc3]295entry:296 %a = load i64, ptr %ptr297 %shamt = and i64 %cl, 63298 %shl = shl i64 %a, %shamt299 ret i64 %shl300}301 302define i8 @shl8mi(ptr %ptr) {303; CHECK-LABEL: shl8mi:304; CHECK: # %bb.0: # %entry305; CHECK-NEXT: shlb $4, (%rdi), %al # encoding: [0x62,0xf4,0x7c,0x18,0xc0,0x27,0x04]306; CHECK-NEXT: retq # encoding: [0xc3]307;308; NF-LABEL: shl8mi:309; NF: # %bb.0: # %entry310; NF-NEXT: {nf} shlb $4, (%rdi), %al # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xc0,0x27,0x04]311; NF-NEXT: retq # encoding: [0xc3]312entry:313 %a = load i8, ptr %ptr314 %shl = shl i8 %a, 4315 ret i8 %shl316}317 318define i16 @shl16mi(ptr %ptr) {319; CHECK-LABEL: shl16mi:320; CHECK: # %bb.0: # %entry321; CHECK-NEXT: shlw $4, (%rdi), %ax # encoding: [0x62,0xf4,0x7d,0x18,0xc1,0x27,0x04]322; CHECK-NEXT: retq # encoding: [0xc3]323;324; NF-LABEL: shl16mi:325; NF: # %bb.0: # %entry326; NF-NEXT: {nf} shlw $4, (%rdi), %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0xc1,0x27,0x04]327; NF-NEXT: retq # encoding: [0xc3]328entry:329 %a = load i16, ptr %ptr330 %shl = shl i16 %a, 4331 ret i16 %shl332}333 334define i32 @shl32mi(ptr %ptr) {335; CHECK-LABEL: shl32mi:336; CHECK: # %bb.0: # %entry337; CHECK-NEXT: shll $4, (%rdi), %eax # encoding: [0x62,0xf4,0x7c,0x18,0xc1,0x27,0x04]338; CHECK-NEXT: retq # encoding: [0xc3]339;340; NF-LABEL: shl32mi:341; NF: # %bb.0: # %entry342; NF-NEXT: {nf} shll $4, (%rdi), %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xc1,0x27,0x04]343; NF-NEXT: retq # encoding: [0xc3]344entry:345 %a = load i32, ptr %ptr346 %shl = shl i32 %a, 4347 ret i32 %shl348}349 350define i64 @shl64mi(ptr %ptr) {351; CHECK-LABEL: shl64mi:352; CHECK: # %bb.0: # %entry353; CHECK-NEXT: shlq $4, (%rdi), %rax # encoding: [0x62,0xf4,0xfc,0x18,0xc1,0x27,0x04]354; CHECK-NEXT: retq # encoding: [0xc3]355;356; NF-LABEL: shl64mi:357; NF: # %bb.0: # %entry358; NF-NEXT: {nf} shlq $4, (%rdi), %rax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0xfc,0x1c,0xc1,0x27,0x04]359; NF-NEXT: retq # encoding: [0xc3]360entry:361 %a = load i64, ptr %ptr362 %shl = shl i64 %a, 4363 ret i64 %shl364}365 366define i8 @shl8r1(i8 noundef %a) {367; CHECK-LABEL: shl8r1:368; CHECK: # %bb.0: # %entry369; CHECK-NEXT: addb %dil, %dil, %al # encoding: [0x62,0xf4,0x7c,0x18,0x00,0xff]370; CHECK-NEXT: retq # encoding: [0xc3]371;372; NF-LABEL: shl8r1:373; NF: # %bb.0: # %entry374; NF-NEXT: {nf} addb %dil, %dil, %al # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x00,0xff]375; NF-NEXT: retq # encoding: [0xc3]376entry:377 %shl = shl i8 %a, 1378 ret i8 %shl379}380 381define i16 @shl16r1(i16 noundef %a) {382; CHECK-LABEL: shl16r1:383; CHECK: # %bb.0: # %entry384; CHECK-NEXT: addw %di, %di, %ax # encoding: [0x62,0xf4,0x7d,0x18,0x01,0xff]385; CHECK-NEXT: retq # encoding: [0xc3]386;387; NF-LABEL: shl16r1:388; NF: # %bb.0: # %entry389; NF-NEXT: {nf} addw %di, %di, %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0x01,0xff]390; NF-NEXT: retq # encoding: [0xc3]391entry:392 %shl = shl i16 %a, 1393 ret i16 %shl394}395 396define i32 @shl32r1(i32 noundef %a) {397; CHECK-LABEL: shl32r1:398; CHECK: # %bb.0: # %entry399; CHECK-NEXT: leal (%rdi,%rdi), %eax # encoding: [0x8d,0x04,0x3f]400; CHECK-NEXT: retq # encoding: [0xc3]401;402; NF-LABEL: shl32r1:403; NF: # %bb.0: # %entry404; NF-NEXT: leal (%rdi,%rdi), %eax # encoding: [0x8d,0x04,0x3f]405; NF-NEXT: retq # encoding: [0xc3]406entry:407 %shl = shl i32 %a, 1408 ret i32 %shl409}410 411define i64 @shl64r1(i64 noundef %a) {412; CHECK-LABEL: shl64r1:413; CHECK: # %bb.0: # %entry414; CHECK-NEXT: leaq (%rdi,%rdi), %rax # encoding: [0x48,0x8d,0x04,0x3f]415; CHECK-NEXT: retq # encoding: [0xc3]416;417; NF-LABEL: shl64r1:418; NF: # %bb.0: # %entry419; NF-NEXT: leaq (%rdi,%rdi), %rax # encoding: [0x48,0x8d,0x04,0x3f]420; NF-NEXT: retq # encoding: [0xc3]421entry:422 %shl = shl i64 %a, 1423 ret i64 %shl424}425 426define i8 @shl8rcl(i8 noundef %a, i8 %cl) {427; CHECK-LABEL: shl8rcl:428; CHECK: # %bb.0: # %entry429; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]430; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx431; CHECK-NEXT: shlb %cl, %dil, %al # encoding: [0x62,0xf4,0x7c,0x18,0xd2,0xe7]432; CHECK-NEXT: retq # encoding: [0xc3]433;434; NF-LABEL: shl8rcl:435; NF: # %bb.0: # %entry436; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]437; NF-NEXT: # kill: def $cl killed $cl killed $ecx438; NF-NEXT: {nf} shlb %cl, %dil, %al # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xd2,0xe7]439; NF-NEXT: retq # encoding: [0xc3]440entry:441 %shl = shl i8 %a, %cl442 ret i8 %shl443}444 445define i8 @shl8rcl_mask(i8 noundef %a, i8 %cl) {446; CHECK-LABEL: shl8rcl_mask:447; CHECK: # %bb.0: # %entry448; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]449; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx450; CHECK-NEXT: shlb %cl, %dil, %al # encoding: [0x62,0xf4,0x7c,0x18,0xd2,0xe7]451; CHECK-NEXT: retq # encoding: [0xc3]452;453; NF-LABEL: shl8rcl_mask:454; NF: # %bb.0: # %entry455; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]456; NF-NEXT: # kill: def $cl killed $cl killed $ecx457; NF-NEXT: {nf} shlb %cl, %dil, %al # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xd2,0xe7]458; NF-NEXT: retq # encoding: [0xc3]459entry:460 %shamt = and i8 %cl, 31461 %shl = shl i8 %a, %shamt462 ret i8 %shl463}464 465define i16 @shl16rcl(i16 noundef %a, i16 %cl) {466; CHECK-LABEL: shl16rcl:467; CHECK: # %bb.0: # %entry468; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]469; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx470; CHECK-NEXT: shlw %cl, %di, %ax # encoding: [0x62,0xf4,0x7d,0x18,0xd3,0xe7]471; CHECK-NEXT: retq # encoding: [0xc3]472;473; NF-LABEL: shl16rcl:474; NF: # %bb.0: # %entry475; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]476; NF-NEXT: # kill: def $cl killed $cl killed $ecx477; NF-NEXT: {nf} shlw %cl, %di, %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0xd3,0xe7]478; NF-NEXT: retq # encoding: [0xc3]479entry:480 %shl = shl i16 %a, %cl481 ret i16 %shl482}483 484define i16 @shl16rcl_mask(i16 noundef %a, i16 %cl) {485; CHECK-LABEL: shl16rcl_mask:486; CHECK: # %bb.0: # %entry487; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]488; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx489; CHECK-NEXT: shlw %cl, %di, %ax # encoding: [0x62,0xf4,0x7d,0x18,0xd3,0xe7]490; CHECK-NEXT: retq # encoding: [0xc3]491;492; NF-LABEL: shl16rcl_mask:493; NF: # %bb.0: # %entry494; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]495; NF-NEXT: # kill: def $cl killed $cl killed $ecx496; NF-NEXT: {nf} shlw %cl, %di, %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0xd3,0xe7]497; NF-NEXT: retq # encoding: [0xc3]498entry:499 %shamt = and i16 %cl, 31500 %shl = shl i16 %a, %shamt501 ret i16 %shl502}503 504define i32 @shl32rcl(i32 noundef %a, i32 %cl) {505; CHECK-LABEL: shl32rcl:506; CHECK: # %bb.0: # %entry507; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]508; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx509; CHECK-NEXT: shll %cl, %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0xd3,0xe7]510; CHECK-NEXT: retq # encoding: [0xc3]511;512; NF-LABEL: shl32rcl:513; NF: # %bb.0: # %entry514; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]515; NF-NEXT: # kill: def $cl killed $cl killed $ecx516; NF-NEXT: {nf} shll %cl, %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xd3,0xe7]517; NF-NEXT: retq # encoding: [0xc3]518entry:519 %shl = shl i32 %a, %cl520 ret i32 %shl521}522 523define i32 @shl32rcl_mask(i32 noundef %a, i32 %cl) {524; CHECK-LABEL: shl32rcl_mask:525; CHECK: # %bb.0: # %entry526; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]527; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx528; CHECK-NEXT: shll %cl, %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0xd3,0xe7]529; CHECK-NEXT: retq # encoding: [0xc3]530;531; NF-LABEL: shl32rcl_mask:532; NF: # %bb.0: # %entry533; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]534; NF-NEXT: # kill: def $cl killed $cl killed $ecx535; NF-NEXT: {nf} shll %cl, %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0xd3,0xe7]536; NF-NEXT: retq # encoding: [0xc3]537entry:538 %shamt = and i32 %cl, 31539 %shl = shl i32 %a, %shamt540 ret i32 %shl541}542 543define i64 @shl64rcl(i64 noundef %a, i64 %cl) {544; CHECK-LABEL: shl64rcl:545; CHECK: # %bb.0: # %entry546; CHECK-NEXT: movq %rsi, %rcx # encoding: [0x48,0x89,0xf1]547; CHECK-NEXT: # kill: def $cl killed $cl killed $rcx548; CHECK-NEXT: shlq %cl, %rdi, %rax # encoding: [0x62,0xf4,0xfc,0x18,0xd3,0xe7]549; CHECK-NEXT: retq # encoding: [0xc3]550;551; NF-LABEL: shl64rcl:552; NF: # %bb.0: # %entry553; NF-NEXT: movq %rsi, %rcx # encoding: [0x48,0x89,0xf1]554; NF-NEXT: # kill: def $cl killed $cl killed $rcx555; NF-NEXT: {nf} shlq %cl, %rdi, %rax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0xfc,0x1c,0xd3,0xe7]556; NF-NEXT: retq # encoding: [0xc3]557entry:558 %shl = shl i64 %a, %cl559 ret i64 %shl560}561 562define i64 @shl64rcl_mask(i64 noundef %a, i64 %cl) {563; CHECK-LABEL: shl64rcl_mask:564; CHECK: # %bb.0: # %entry565; CHECK-NEXT: movq %rsi, %rcx # encoding: [0x48,0x89,0xf1]566; CHECK-NEXT: # kill: def $cl killed $cl killed $rcx567; CHECK-NEXT: shlq %cl, %rdi, %rax # encoding: [0x62,0xf4,0xfc,0x18,0xd3,0xe7]568; CHECK-NEXT: retq # encoding: [0xc3]569;570; NF-LABEL: shl64rcl_mask:571; NF: # %bb.0: # %entry572; NF-NEXT: movq %rsi, %rcx # encoding: [0x48,0x89,0xf1]573; NF-NEXT: # kill: def $cl killed $cl killed $rcx574; NF-NEXT: {nf} shlq %cl, %rdi, %rax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0xfc,0x1c,0xd3,0xe7]575; NF-NEXT: retq # encoding: [0xc3]576entry:577 %shamt = and i64 %cl, 63578 %shl = shl i64 %a, %shamt579 ret i64 %shl580}581 582define void @shl8m1_legacy(ptr %ptr) {583; CHECK-LABEL: shl8m1_legacy:584; CHECK: # %bb.0: # %entry585; CHECK-NEXT: shlb (%rdi) # encoding: [0xd0,0x27]586; CHECK-NEXT: retq # encoding: [0xc3]587;588; NF-LABEL: shl8m1_legacy:589; NF: # %bb.0: # %entry590; NF-NEXT: shlb (%rdi) # encoding: [0xd0,0x27]591; NF-NEXT: retq # encoding: [0xc3]592entry:593 %a = load i8, ptr %ptr594 %shl = shl i8 %a, 1595 store i8 %shl, ptr %ptr596 ret void597}598 599define void @shl16m1_legacy(ptr %ptr) {600; CHECK-LABEL: shl16m1_legacy:601; CHECK: # %bb.0: # %entry602; CHECK-NEXT: shlw (%rdi) # encoding: [0x66,0xd1,0x27]603; CHECK-NEXT: retq # encoding: [0xc3]604;605; NF-LABEL: shl16m1_legacy:606; NF: # %bb.0: # %entry607; NF-NEXT: shlw (%rdi) # encoding: [0x66,0xd1,0x27]608; NF-NEXT: retq # encoding: [0xc3]609entry:610 %a = load i16, ptr %ptr611 %shl = shl i16 %a, 1612 store i16 %shl, ptr %ptr613 ret void614}615 616define void @shl32m1_legacy(ptr %ptr) {617; CHECK-LABEL: shl32m1_legacy:618; CHECK: # %bb.0: # %entry619; CHECK-NEXT: shll (%rdi) # encoding: [0xd1,0x27]620; CHECK-NEXT: retq # encoding: [0xc3]621;622; NF-LABEL: shl32m1_legacy:623; NF: # %bb.0: # %entry624; NF-NEXT: shll (%rdi) # encoding: [0xd1,0x27]625; NF-NEXT: retq # encoding: [0xc3]626entry:627 %a = load i32, ptr %ptr628 %shl = shl i32 %a, 1629 store i32 %shl, ptr %ptr630 ret void631}632 633define void @shl64m1_legacy(ptr %ptr) {634; CHECK-LABEL: shl64m1_legacy:635; CHECK: # %bb.0: # %entry636; CHECK-NEXT: shlq (%rdi) # encoding: [0x48,0xd1,0x27]637; CHECK-NEXT: retq # encoding: [0xc3]638;639; NF-LABEL: shl64m1_legacy:640; NF: # %bb.0: # %entry641; NF-NEXT: shlq (%rdi) # encoding: [0x48,0xd1,0x27]642; NF-NEXT: retq # encoding: [0xc3]643entry:644 %a = load i64, ptr %ptr645 %shl = shl i64 %a, 1646 store i64 %shl, ptr %ptr647 ret void648}649 650define void @shl8mi_legacy(ptr %ptr) {651; CHECK-LABEL: shl8mi_legacy:652; CHECK: # %bb.0: # %entry653; CHECK-NEXT: shlb $4, (%rdi) # encoding: [0xc0,0x27,0x04]654; CHECK-NEXT: retq # encoding: [0xc3]655;656; NF-LABEL: shl8mi_legacy:657; NF: # %bb.0: # %entry658; NF-NEXT: shlb $4, (%rdi) # encoding: [0xc0,0x27,0x04]659; NF-NEXT: retq # encoding: [0xc3]660entry:661 %a = load i8, ptr %ptr662 %shl = shl i8 %a, 4663 store i8 %shl, ptr %ptr664 ret void665}666 667define void @shl16mi_legacy(ptr %ptr) {668; CHECK-LABEL: shl16mi_legacy:669; CHECK: # %bb.0: # %entry670; CHECK-NEXT: shlw $4, (%rdi) # encoding: [0x66,0xc1,0x27,0x04]671; CHECK-NEXT: retq # encoding: [0xc3]672;673; NF-LABEL: shl16mi_legacy:674; NF: # %bb.0: # %entry675; NF-NEXT: shlw $4, (%rdi) # encoding: [0x66,0xc1,0x27,0x04]676; NF-NEXT: retq # encoding: [0xc3]677entry:678 %a = load i16, ptr %ptr679 %shl = shl i16 %a, 4680 store i16 %shl, ptr %ptr681 ret void682}683 684define void @shl32mi_legacy(ptr %ptr) {685; CHECK-LABEL: shl32mi_legacy:686; CHECK: # %bb.0: # %entry687; CHECK-NEXT: shll $4, (%rdi) # encoding: [0xc1,0x27,0x04]688; CHECK-NEXT: retq # encoding: [0xc3]689;690; NF-LABEL: shl32mi_legacy:691; NF: # %bb.0: # %entry692; NF-NEXT: shll $4, (%rdi) # encoding: [0xc1,0x27,0x04]693; NF-NEXT: retq # encoding: [0xc3]694entry:695 %a = load i32, ptr %ptr696 %shl = shl i32 %a, 4697 store i32 %shl, ptr %ptr698 ret void699}700 701define void @shl64mi_legacy(ptr %ptr) {702; CHECK-LABEL: shl64mi_legacy:703; CHECK: # %bb.0: # %entry704; CHECK-NEXT: shlq $4, (%rdi) # encoding: [0x48,0xc1,0x27,0x04]705; CHECK-NEXT: retq # encoding: [0xc3]706;707; NF-LABEL: shl64mi_legacy:708; NF: # %bb.0: # %entry709; NF-NEXT: shlq $4, (%rdi) # encoding: [0x48,0xc1,0x27,0x04]710; NF-NEXT: retq # encoding: [0xc3]711entry:712 %a = load i64, ptr %ptr713 %shl = shl i64 %a, 4714 store i64 %shl, ptr %ptr715 ret void716}717 718define void @shl8mcl_legacy(ptr %ptr, i8 %cl) {719; CHECK-LABEL: shl8mcl_legacy:720; CHECK: # %bb.0: # %entry721; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]722; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx723; CHECK-NEXT: shlb %cl, (%rdi) # encoding: [0xd2,0x27]724; CHECK-NEXT: retq # encoding: [0xc3]725;726; NF-LABEL: shl8mcl_legacy:727; NF: # %bb.0: # %entry728; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]729; NF-NEXT: # kill: def $cl killed $cl killed $ecx730; NF-NEXT: shlb %cl, (%rdi) # encoding: [0xd2,0x27]731; NF-NEXT: retq # encoding: [0xc3]732entry:733 %a = load i8, ptr %ptr734 %shl = shl i8 %a, %cl735 store i8 %shl, ptr %ptr736 ret void737}738 739define void @shl16mcl_legacy(ptr %ptr, i16 %cl) {740; CHECK-LABEL: shl16mcl_legacy:741; CHECK: # %bb.0: # %entry742; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]743; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx744; CHECK-NEXT: shlw %cl, (%rdi) # encoding: [0x66,0xd3,0x27]745; CHECK-NEXT: retq # encoding: [0xc3]746;747; NF-LABEL: shl16mcl_legacy:748; NF: # %bb.0: # %entry749; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]750; NF-NEXT: # kill: def $cl killed $cl killed $ecx751; NF-NEXT: shlw %cl, (%rdi) # encoding: [0x66,0xd3,0x27]752; NF-NEXT: retq # encoding: [0xc3]753entry:754 %a = load i16, ptr %ptr755 %shl = shl i16 %a, %cl756 store i16 %shl, ptr %ptr757 ret void758}759 760define void @shl32mcl_legacy(ptr %ptr, i32 %cl) {761; CHECK-LABEL: shl32mcl_legacy:762; CHECK: # %bb.0: # %entry763; CHECK-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]764; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx765; CHECK-NEXT: shll %cl, (%rdi) # encoding: [0xd3,0x27]766; CHECK-NEXT: retq # encoding: [0xc3]767;768; NF-LABEL: shl32mcl_legacy:769; NF: # %bb.0: # %entry770; NF-NEXT: movl %esi, %ecx # encoding: [0x89,0xf1]771; NF-NEXT: # kill: def $cl killed $cl killed $ecx772; NF-NEXT: shll %cl, (%rdi) # encoding: [0xd3,0x27]773; NF-NEXT: retq # encoding: [0xc3]774entry:775 %a = load i32, ptr %ptr776 %shl = shl i32 %a, %cl777 store i32 %shl, ptr %ptr778 ret void779}780 781define void @shl64mcl_legacy(ptr %ptr, i64 %cl) {782; CHECK-LABEL: shl64mcl_legacy:783; CHECK: # %bb.0: # %entry784; CHECK-NEXT: movq %rsi, %rcx # encoding: [0x48,0x89,0xf1]785; CHECK-NEXT: # kill: def $cl killed $cl killed $rcx786; CHECK-NEXT: shlq %cl, (%rdi) # encoding: [0x48,0xd3,0x27]787; CHECK-NEXT: retq # encoding: [0xc3]788;789; NF-LABEL: shl64mcl_legacy:790; NF: # %bb.0: # %entry791; NF-NEXT: movq %rsi, %rcx # encoding: [0x48,0x89,0xf1]792; NF-NEXT: # kill: def $cl killed $cl killed $rcx793; NF-NEXT: shlq %cl, (%rdi) # encoding: [0x48,0xd3,0x27]794; NF-NEXT: retq # encoding: [0xc3]795entry:796 %a = load i64, ptr %ptr797 %shl = shl i64 %a, %cl798 store i64 %shl, ptr %ptr799 ret void800}801