brintos

brintos / llvm-project-archived public Read only

0
0
Text · 32.1 KiB · b442260 Raw
929 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 @and8rr(i8 noundef %a, i8 noundef %b) {7; CHECK-LABEL: and8rr:8; CHECK:       # %bb.0: # %entry9; CHECK-NEXT:    andl %esi, %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0x21,0xf7]10; CHECK-NEXT:    # kill: def $al killed $al killed $eax11; CHECK-NEXT:    retq # encoding: [0xc3]12;13; NF-LABEL: and8rr:14; NF:       # %bb.0: # %entry15; NF-NEXT:    {nf} andl %esi, %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x21,0xf7]16; NF-NEXT:    # kill: def $al killed $al killed $eax17; NF-NEXT:    retq # encoding: [0xc3]18entry:19    %and = and i8 %a, %b20    ret i8 %and21}22 23define i16 @and16rr(i16 noundef %a, i16 noundef %b) {24; CHECK-LABEL: and16rr:25; CHECK:       # %bb.0: # %entry26; CHECK-NEXT:    andl %esi, %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0x21,0xf7]27; CHECK-NEXT:    # kill: def $ax killed $ax killed $eax28; CHECK-NEXT:    retq # encoding: [0xc3]29;30; NF-LABEL: and16rr:31; NF:       # %bb.0: # %entry32; NF-NEXT:    {nf} andl %esi, %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x21,0xf7]33; NF-NEXT:    # kill: def $ax killed $ax killed $eax34; NF-NEXT:    retq # encoding: [0xc3]35entry:36    %and = and i16 %a, %b37    ret i16 %and38}39 40define i32 @and32rr(i32 noundef %a, i32 noundef %b) {41; CHECK-LABEL: and32rr:42; CHECK:       # %bb.0: # %entry43; CHECK-NEXT:    andl %esi, %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0x21,0xf7]44; CHECK-NEXT:    retq # encoding: [0xc3]45;46; NF-LABEL: and32rr:47; NF:       # %bb.0: # %entry48; NF-NEXT:    {nf} andl %esi, %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x21,0xf7]49; NF-NEXT:    retq # encoding: [0xc3]50entry:51    %and = and i32 %a, %b52    ret i32 %and53}54 55define i64 @and64rr(i64 noundef %a, i64 noundef %b) {56; CHECK-LABEL: and64rr:57; CHECK:       # %bb.0: # %entry58; CHECK-NEXT:    andq %rsi, %rdi, %rax # encoding: [0x62,0xf4,0xfc,0x18,0x21,0xf7]59; CHECK-NEXT:    retq # encoding: [0xc3]60;61; NF-LABEL: and64rr:62; NF:       # %bb.0: # %entry63; NF-NEXT:    {nf} andq %rsi, %rdi, %rax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0xfc,0x1c,0x21,0xf7]64; NF-NEXT:    retq # encoding: [0xc3]65entry:66    %and = and i64 %a, %b67    ret i64 %and68}69 70define i8 @and8rm(i8 noundef %a, ptr %b) {71; CHECK-LABEL: and8rm:72; CHECK:       # %bb.0: # %entry73; CHECK-NEXT:    andb (%rsi), %dil, %al # encoding: [0x62,0xf4,0x7c,0x18,0x22,0x3e]74; CHECK-NEXT:    retq # encoding: [0xc3]75;76; NF-LABEL: and8rm:77; NF:       # %bb.0: # %entry78; NF-NEXT:    {nf} andb (%rsi), %dil, %al # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x22,0x3e]79; NF-NEXT:    retq # encoding: [0xc3]80entry:81    %t = load i8, ptr %b82    %and = and i8 %a, %t83    ret i8 %and84}85 86define i16 @and16rm(i16 noundef %a, ptr %b) {87; CHECK-LABEL: and16rm:88; CHECK:       # %bb.0: # %entry89; CHECK-NEXT:    andw (%rsi), %di, %ax # encoding: [0x62,0xf4,0x7d,0x18,0x23,0x3e]90; CHECK-NEXT:    retq # encoding: [0xc3]91;92; NF-LABEL: and16rm:93; NF:       # %bb.0: # %entry94; NF-NEXT:    {nf} andw (%rsi), %di, %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0x23,0x3e]95; NF-NEXT:    retq # encoding: [0xc3]96entry:97    %t = load i16, ptr %b98    %and = and i16 %a, %t99    ret i16 %and100}101 102define i32 @and32rm(i32 noundef %a, ptr %b) {103; CHECK-LABEL: and32rm:104; CHECK:       # %bb.0: # %entry105; CHECK-NEXT:    andl (%rsi), %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0x23,0x3e]106; CHECK-NEXT:    retq # encoding: [0xc3]107;108; NF-LABEL: and32rm:109; NF:       # %bb.0: # %entry110; NF-NEXT:    {nf} andl (%rsi), %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x23,0x3e]111; NF-NEXT:    retq # encoding: [0xc3]112entry:113    %t = load i32, ptr %b114    %and = and i32 %a, %t115    ret i32 %and116}117 118define i64 @and64rm(i64 noundef %a, ptr %b) {119; CHECK-LABEL: and64rm:120; CHECK:       # %bb.0: # %entry121; CHECK-NEXT:    andq (%rsi), %rdi, %rax # encoding: [0x62,0xf4,0xfc,0x18,0x23,0x3e]122; CHECK-NEXT:    retq # encoding: [0xc3]123;124; NF-LABEL: and64rm:125; NF:       # %bb.0: # %entry126; NF-NEXT:    {nf} andq (%rsi), %rdi, %rax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0xfc,0x1c,0x23,0x3e]127; NF-NEXT:    retq # encoding: [0xc3]128entry:129    %t = load i64, ptr %b130    %and = and i64 %a, %t131    ret i64 %and132}133 134define i16 @and16ri8(i16 noundef %a) {135; CHECK-LABEL: and16ri8:136; CHECK:       # %bb.0: # %entry137; CHECK-NEXT:    andw $123, %di, %ax # encoding: [0x62,0xf4,0x7d,0x18,0x83,0xe7,0x7b]138; CHECK-NEXT:    retq # encoding: [0xc3]139;140; NF-LABEL: and16ri8:141; NF:       # %bb.0: # %entry142; NF-NEXT:    {nf} andw $123, %di, %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0x83,0xe7,0x7b]143; NF-NEXT:    retq # encoding: [0xc3]144entry:145    %and = and i16 %a, 123146    ret i16 %and147}148 149define i32 @and32ri8(i32 noundef %a) {150; CHECK-LABEL: and32ri8:151; CHECK:       # %bb.0: # %entry152; CHECK-NEXT:    andl $123, %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0x83,0xe7,0x7b]153; CHECK-NEXT:    retq # encoding: [0xc3]154;155; NF-LABEL: and32ri8:156; NF:       # %bb.0: # %entry157; NF-NEXT:    {nf} andl $123, %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x83,0xe7,0x7b]158; NF-NEXT:    retq # encoding: [0xc3]159entry:160    %and = and i32 %a, 123161    ret i32 %and162}163 164define i64 @and64ri8(i64 noundef %a) {165; CHECK-LABEL: and64ri8:166; CHECK:       # %bb.0: # %entry167; CHECK-NEXT:    andl $123, %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0x83,0xe7,0x7b]168; CHECK-NEXT:    retq # encoding: [0xc3]169;170; NF-LABEL: and64ri8:171; NF:       # %bb.0: # %entry172; NF-NEXT:    {nf} andl $123, %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x83,0xe7,0x7b]173; NF-NEXT:    retq # encoding: [0xc3]174entry:175    %and = and i64 %a, 123176    ret i64 %and177}178 179define i8 @and8ri(i8 noundef %a) {180; CHECK-LABEL: and8ri:181; CHECK:       # %bb.0: # %entry182; CHECK-NEXT:    andb $123, %dil, %al # encoding: [0x62,0xf4,0x7c,0x18,0x80,0xe7,0x7b]183; CHECK-NEXT:    retq # encoding: [0xc3]184;185; NF-LABEL: and8ri:186; NF:       # %bb.0: # %entry187; NF-NEXT:    {nf} andb $123, %dil, %al # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x80,0xe7,0x7b]188; NF-NEXT:    retq # encoding: [0xc3]189entry:190    %and = and i8 %a, 123191    ret i8 %and192}193 194define i16 @and16ri(i16 noundef %a) {195; CHECK-LABEL: and16ri:196; CHECK:       # %bb.0: # %entry197; CHECK-NEXT:    andw $1234, %di, %ax # encoding: [0x62,0xf4,0x7d,0x18,0x81,0xe7,0xd2,0x04]198; CHECK-NEXT:    # imm = 0x4D2199; CHECK-NEXT:    retq # encoding: [0xc3]200;201; NF-LABEL: and16ri:202; NF:       # %bb.0: # %entry203; NF-NEXT:    {nf} andw $1234, %di, %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0x81,0xe7,0xd2,0x04]204; NF-NEXT:    # imm = 0x4D2205; NF-NEXT:    retq # encoding: [0xc3]206entry:207    %and = and i16 %a, 1234208    ret i16 %and209}210 211define i32 @and32ri(i32 noundef %a) {212; CHECK-LABEL: and32ri:213; CHECK:       # %bb.0: # %entry214; CHECK-NEXT:    andl $123456, %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0x81,0xe7,0x40,0xe2,0x01,0x00]215; CHECK-NEXT:    # imm = 0x1E240216; CHECK-NEXT:    retq # encoding: [0xc3]217;218; NF-LABEL: and32ri:219; NF:       # %bb.0: # %entry220; NF-NEXT:    {nf} andl $123456, %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x81,0xe7,0x40,0xe2,0x01,0x00]221; NF-NEXT:    # imm = 0x1E240222; NF-NEXT:    retq # encoding: [0xc3]223entry:224    %and = and i32 %a, 123456225    ret i32 %and226}227 228define i64 @and64ri(i64 noundef %a) {229; CHECK-LABEL: and64ri:230; CHECK:       # %bb.0: # %entry231; CHECK-NEXT:    andl $123456, %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0x81,0xe7,0x40,0xe2,0x01,0x00]232; CHECK-NEXT:    # imm = 0x1E240233; CHECK-NEXT:    retq # encoding: [0xc3]234;235; NF-LABEL: and64ri:236; NF:       # %bb.0: # %entry237; NF-NEXT:    {nf} andl $123456, %edi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x81,0xe7,0x40,0xe2,0x01,0x00]238; NF-NEXT:    # imm = 0x1E240239; NF-NEXT:    retq # encoding: [0xc3]240entry:241    %and = and i64 %a, 123456242    ret i64 %and243}244 245define i8 @and8mr(ptr %a, i8 noundef %b) {246; CHECK-LABEL: and8mr:247; CHECK:       # %bb.0: # %entry248; CHECK-NEXT:    andb (%rdi), %sil, %al # encoding: [0x62,0xf4,0x7c,0x18,0x22,0x37]249; CHECK-NEXT:    retq # encoding: [0xc3]250;251; NF-LABEL: and8mr:252; NF:       # %bb.0: # %entry253; NF-NEXT:    {nf} andb (%rdi), %sil, %al # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x22,0x37]254; NF-NEXT:    retq # encoding: [0xc3]255entry:256  %t= load i8, ptr %a257  %and = and i8 %t, %b258  ret i8 %and259}260 261define i16 @and16mr(ptr %a, i16 noundef %b) {262; CHECK-LABEL: and16mr:263; CHECK:       # %bb.0: # %entry264; CHECK-NEXT:    andw (%rdi), %si, %ax # encoding: [0x62,0xf4,0x7d,0x18,0x23,0x37]265; CHECK-NEXT:    retq # encoding: [0xc3]266;267; NF-LABEL: and16mr:268; NF:       # %bb.0: # %entry269; NF-NEXT:    {nf} andw (%rdi), %si, %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0x23,0x37]270; NF-NEXT:    retq # encoding: [0xc3]271entry:272  %t= load i16, ptr %a273  %and = and i16 %t, %b274  ret i16 %and275}276 277define i32 @and32mr(ptr %a, i32 noundef %b) {278; CHECK-LABEL: and32mr:279; CHECK:       # %bb.0: # %entry280; CHECK-NEXT:    andl (%rdi), %esi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0x23,0x37]281; CHECK-NEXT:    retq # encoding: [0xc3]282;283; NF-LABEL: and32mr:284; NF:       # %bb.0: # %entry285; NF-NEXT:    {nf} andl (%rdi), %esi, %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x23,0x37]286; NF-NEXT:    retq # encoding: [0xc3]287entry:288  %t= load i32, ptr %a289  %and = and i32 %t, %b290  ret i32 %and291}292 293define i64 @and64mr(ptr %a, i64 noundef %b) {294; CHECK-LABEL: and64mr:295; CHECK:       # %bb.0: # %entry296; CHECK-NEXT:    andq (%rdi), %rsi, %rax # encoding: [0x62,0xf4,0xfc,0x18,0x23,0x37]297; CHECK-NEXT:    retq # encoding: [0xc3]298;299; NF-LABEL: and64mr:300; NF:       # %bb.0: # %entry301; NF-NEXT:    {nf} andq (%rdi), %rsi, %rax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0xfc,0x1c,0x23,0x37]302; NF-NEXT:    retq # encoding: [0xc3]303entry:304  %t= load i64, ptr %a305  %and = and i64 %t, %b306  ret i64 %and307}308 309define i16 @and16mi8(ptr %a) {310; CHECK-LABEL: and16mi8:311; CHECK:       # %bb.0: # %entry312; CHECK-NEXT:    andw $123, (%rdi), %ax # encoding: [0x62,0xf4,0x7d,0x18,0x83,0x27,0x7b]313; CHECK-NEXT:    retq # encoding: [0xc3]314;315; NF-LABEL: and16mi8:316; NF:       # %bb.0: # %entry317; NF-NEXT:    {nf} andw $123, (%rdi), %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0x83,0x27,0x7b]318; NF-NEXT:    retq # encoding: [0xc3]319entry:320  %t= load i16, ptr %a321  %and = and i16 %t, 123322  ret i16 %and323}324 325define i32 @and32mi8(ptr %a) {326; CHECK-LABEL: and32mi8:327; CHECK:       # %bb.0: # %entry328; CHECK-NEXT:    andl $123, (%rdi), %eax # encoding: [0x62,0xf4,0x7c,0x18,0x83,0x27,0x7b]329; CHECK-NEXT:    retq # encoding: [0xc3]330;331; NF-LABEL: and32mi8:332; NF:       # %bb.0: # %entry333; NF-NEXT:    {nf} andl $123, (%rdi), %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x83,0x27,0x7b]334; NF-NEXT:    retq # encoding: [0xc3]335entry:336  %t= load i32, ptr %a337  %and = and i32 %t, 123338  ret i32 %and339}340 341define i64 @and64mi8(ptr %a) {342; CHECK-LABEL: and64mi8:343; CHECK:       # %bb.0: # %entry344; CHECK-NEXT:    movq (%rdi), %rax # encoding: [0x48,0x8b,0x07]345; CHECK-NEXT:    andl $123, %eax # EVEX TO LEGACY Compression encoding: [0x83,0xe0,0x7b]346; CHECK-NEXT:    retq # encoding: [0xc3]347;348; NF-LABEL: and64mi8:349; NF:       # %bb.0: # %entry350; NF-NEXT:    movq (%rdi), %rax # encoding: [0x48,0x8b,0x07]351; NF-NEXT:    andl $123, %eax # EVEX TO LEGACY Compression encoding: [0x83,0xe0,0x7b]352; NF-NEXT:    retq # encoding: [0xc3]353entry:354  %t= load i64, ptr %a355  %and = and i64 %t, 123356  ret i64 %and357}358 359define i8 @and8mi(ptr %a) {360; CHECK-LABEL: and8mi:361; CHECK:       # %bb.0: # %entry362; CHECK-NEXT:    andb $123, (%rdi), %al # encoding: [0x62,0xf4,0x7c,0x18,0x80,0x27,0x7b]363; CHECK-NEXT:    retq # encoding: [0xc3]364;365; NF-LABEL: and8mi:366; NF:       # %bb.0: # %entry367; NF-NEXT:    {nf} andb $123, (%rdi), %al # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x80,0x27,0x7b]368; NF-NEXT:    retq # encoding: [0xc3]369entry:370  %t= load i8, ptr %a371  %and = and i8 %t, 123372  ret i8 %and373}374 375define i16 @and16mi(ptr %a) {376; CHECK-LABEL: and16mi:377; CHECK:       # %bb.0: # %entry378; CHECK-NEXT:    andw $1234, (%rdi), %ax # encoding: [0x62,0xf4,0x7d,0x18,0x81,0x27,0xd2,0x04]379; CHECK-NEXT:    # imm = 0x4D2380; CHECK-NEXT:    retq # encoding: [0xc3]381;382; NF-LABEL: and16mi:383; NF:       # %bb.0: # %entry384; NF-NEXT:    {nf} andw $1234, (%rdi), %ax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7d,0x1c,0x81,0x27,0xd2,0x04]385; NF-NEXT:    # imm = 0x4D2386; NF-NEXT:    retq # encoding: [0xc3]387entry:388  %t= load i16, ptr %a389  %and = and i16 %t, 1234390  ret i16 %and391}392 393define i32 @and32mi(ptr %a) {394; CHECK-LABEL: and32mi:395; CHECK:       # %bb.0: # %entry396; CHECK-NEXT:    andl $123456, (%rdi), %eax # encoding: [0x62,0xf4,0x7c,0x18,0x81,0x27,0x40,0xe2,0x01,0x00]397; CHECK-NEXT:    # imm = 0x1E240398; CHECK-NEXT:    retq # encoding: [0xc3]399;400; NF-LABEL: and32mi:401; NF:       # %bb.0: # %entry402; NF-NEXT:    {nf} andl $123456, (%rdi), %eax # EVEX TO EVEX Compression encoding: [0x62,0xf4,0x7c,0x1c,0x81,0x27,0x40,0xe2,0x01,0x00]403; NF-NEXT:    # imm = 0x1E240404; NF-NEXT:    retq # encoding: [0xc3]405entry:406  %t= load i32, ptr %a407  %and = and i32 %t, 123456408  ret i32 %and409}410 411define i64 @and64mi(ptr %a) {412; CHECK-LABEL: and64mi:413; CHECK:       # %bb.0: # %entry414; CHECK-NEXT:    movq (%rdi), %rax # encoding: [0x48,0x8b,0x07]415; CHECK-NEXT:    andl $123456, %eax # EVEX TO LEGACY Compression encoding: [0x25,0x40,0xe2,0x01,0x00]416; CHECK-NEXT:    # imm = 0x1E240417; CHECK-NEXT:    retq # encoding: [0xc3]418;419; NF-LABEL: and64mi:420; NF:       # %bb.0: # %entry421; NF-NEXT:    movq (%rdi), %rax # encoding: [0x48,0x8b,0x07]422; NF-NEXT:    andl $123456, %eax # EVEX TO LEGACY Compression encoding: [0x25,0x40,0xe2,0x01,0x00]423; NF-NEXT:    # imm = 0x1E240424; NF-NEXT:    retq # encoding: [0xc3]425entry:426  %t= load i64, ptr %a427  %and = and i64 %t, 123456428  ret i64 %and429}430 431@d64 = dso_local global i64 0432 433define i1 @andflag8rr(i8 %a, i8 %b) {434; CHECK-LABEL: andflag8rr:435; CHECK:       # %bb.0:436; CHECK-NEXT:    notb %sil, %al # encoding: [0x62,0xf4,0x7c,0x18,0xf6,0xd6]437; CHECK-NEXT:    andb %al, %dil, %cl # encoding: [0x62,0xf4,0x74,0x18,0x20,0xc7]438; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]439; CHECK-NEXT:    movb %cl, d64(%rip) # encoding: [0x88,0x0d,A,A,A,A]440; CHECK-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte441; CHECK-NEXT:    retq # encoding: [0xc3]442;443; NF-LABEL: andflag8rr:444; NF:       # %bb.0:445; NF-NEXT:    notb %sil, %al # encoding: [0x62,0xf4,0x7c,0x18,0xf6,0xd6]446; NF-NEXT:    andb %al, %dil, %cl # encoding: [0x62,0xf4,0x74,0x18,0x20,0xc7]447; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]448; NF-NEXT:    movb %cl, d64(%rip) # encoding: [0x88,0x0d,A,A,A,A]449; NF-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte450; NF-NEXT:    retq # encoding: [0xc3]451  %xor = xor i8 %b, -1452  %v0 = and i8 %a, %xor  ; 0xff << 50453  %v1 = icmp eq i8 %v0, 0454  store i8 %v0, ptr @d64455  ret i1 %v1456}457 458define i1 @andflag16rr(i16 %a, i16 %b) {459; CHECK-LABEL: andflag16rr:460; CHECK:       # %bb.0:461; CHECK-NEXT:    notw %si, %ax # encoding: [0x62,0xf4,0x7d,0x18,0xf7,0xd6]462; CHECK-NEXT:    andw %ax, %di, %cx # encoding: [0x62,0xf4,0x75,0x18,0x21,0xc7]463; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]464; CHECK-NEXT:    movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]465; CHECK-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte466; CHECK-NEXT:    retq # encoding: [0xc3]467;468; NF-LABEL: andflag16rr:469; NF:       # %bb.0:470; NF-NEXT:    notw %si, %ax # encoding: [0x62,0xf4,0x7d,0x18,0xf7,0xd6]471; NF-NEXT:    andw %ax, %di, %cx # encoding: [0x62,0xf4,0x75,0x18,0x21,0xc7]472; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]473; NF-NEXT:    movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]474; NF-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte475; NF-NEXT:    retq # encoding: [0xc3]476  %xor = xor i16 %b, -1477  %v0 = and i16 %a, %xor  ; 0xff << 50478  %v1 = icmp eq i16 %v0, 0479  store i16 %v0, ptr @d64480  ret i1 %v1481}482 483define i1 @andflag32rr(i32 %a, i32 %b) {484; CHECK-LABEL: andflag32rr:485; CHECK:       # %bb.0:486; CHECK-NEXT:    andl %edi, %esi # EVEX TO LEGACY Compression encoding: [0x21,0xfe]487; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]488; CHECK-NEXT:    movl %esi, d64(%rip) # encoding: [0x89,0x35,A,A,A,A]489; CHECK-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte490; CHECK-NEXT:    retq # encoding: [0xc3]491;492; NF-LABEL: andflag32rr:493; NF:       # %bb.0:494; NF-NEXT:    andl %edi, %esi # EVEX TO LEGACY Compression encoding: [0x21,0xfe]495; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]496; NF-NEXT:    movl %esi, d64(%rip) # encoding: [0x89,0x35,A,A,A,A]497; NF-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte498; NF-NEXT:    retq # encoding: [0xc3]499  %v0 = and i32 %a, %b  ; 0xff << 50500  %v1 = icmp eq i32 %v0, 0501  store i32 %v0, ptr @d64502  ret i1 %v1503}504 505define i1 @andflag64rr(i64 %a, i64 %b) {506; CHECK-LABEL: andflag64rr:507; CHECK:       # %bb.0:508; CHECK-NEXT:    andq %rdi, %rsi # EVEX TO LEGACY Compression encoding: [0x48,0x21,0xfe]509; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]510; CHECK-NEXT:    movq %rsi, d64(%rip) # encoding: [0x48,0x89,0x35,A,A,A,A]511; CHECK-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte512; CHECK-NEXT:    retq # encoding: [0xc3]513;514; NF-LABEL: andflag64rr:515; NF:       # %bb.0:516; NF-NEXT:    andq %rdi, %rsi # EVEX TO LEGACY Compression encoding: [0x48,0x21,0xfe]517; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]518; NF-NEXT:    movq %rsi, d64(%rip) # encoding: [0x48,0x89,0x35,A,A,A,A]519; NF-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte520; NF-NEXT:    retq # encoding: [0xc3]521  %v0 = and i64 %a, %b  ; 0xff << 50522  %v1 = icmp eq i64 %v0, 0523  store i64 %v0, ptr @d64524  ret i1 %v1525}526 527define i1 @andflag8rm(ptr %ptr, i8 %b) {528; CHECK-LABEL: andflag8rm:529; CHECK:       # %bb.0:530; CHECK-NEXT:    notb %sil, %al # encoding: [0x62,0xf4,0x7c,0x18,0xf6,0xd6]531; CHECK-NEXT:    andb (%rdi), %al, %cl # encoding: [0x62,0xf4,0x74,0x18,0x22,0x07]532; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]533; CHECK-NEXT:    movb %cl, d64(%rip) # encoding: [0x88,0x0d,A,A,A,A]534; CHECK-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte535; CHECK-NEXT:    retq # encoding: [0xc3]536;537; NF-LABEL: andflag8rm:538; NF:       # %bb.0:539; NF-NEXT:    notb %sil, %al # encoding: [0x62,0xf4,0x7c,0x18,0xf6,0xd6]540; NF-NEXT:    andb (%rdi), %al, %cl # encoding: [0x62,0xf4,0x74,0x18,0x22,0x07]541; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]542; NF-NEXT:    movb %cl, d64(%rip) # encoding: [0x88,0x0d,A,A,A,A]543; NF-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte544; NF-NEXT:    retq # encoding: [0xc3]545  %a = load i8, ptr %ptr546  %xor = xor i8 %b, -1547  %v0 = and i8 %a, %xor  ; 0xff << 50548  %v1 = icmp eq i8 %v0, 0549  store i8 %v0, ptr @d64550  ret i1 %v1551}552 553define i1 @andflag16rm(ptr %ptr, i16 %b) {554; CHECK-LABEL: andflag16rm:555; CHECK:       # %bb.0:556; CHECK-NEXT:    notw %si, %ax # encoding: [0x62,0xf4,0x7d,0x18,0xf7,0xd6]557; CHECK-NEXT:    andw (%rdi), %ax, %cx # encoding: [0x62,0xf4,0x75,0x18,0x23,0x07]558; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]559; CHECK-NEXT:    movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]560; CHECK-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte561; CHECK-NEXT:    retq # encoding: [0xc3]562;563; NF-LABEL: andflag16rm:564; NF:       # %bb.0:565; NF-NEXT:    notw %si, %ax # encoding: [0x62,0xf4,0x7d,0x18,0xf7,0xd6]566; NF-NEXT:    andw (%rdi), %ax, %cx # encoding: [0x62,0xf4,0x75,0x18,0x23,0x07]567; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]568; NF-NEXT:    movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]569; NF-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte570; NF-NEXT:    retq # encoding: [0xc3]571  %a = load i16, ptr %ptr572  %xor = xor i16 %b, -1573  %v0 = and i16 %a, %xor  ; 0xff << 50574  %v1 = icmp eq i16 %v0, 0575  store i16 %v0, ptr @d64576  ret i1 %v1577}578 579define i1 @andflag32rm(ptr %ptr, i32 %b) {580; CHECK-LABEL: andflag32rm:581; CHECK:       # %bb.0:582; CHECK-NEXT:    andl (%rdi), %esi # EVEX TO LEGACY Compression encoding: [0x23,0x37]583; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]584; CHECK-NEXT:    movl %esi, d64(%rip) # encoding: [0x89,0x35,A,A,A,A]585; CHECK-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte586; CHECK-NEXT:    retq # encoding: [0xc3]587;588; NF-LABEL: andflag32rm:589; NF:       # %bb.0:590; NF-NEXT:    andl (%rdi), %esi # EVEX TO LEGACY Compression encoding: [0x23,0x37]591; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]592; NF-NEXT:    movl %esi, d64(%rip) # encoding: [0x89,0x35,A,A,A,A]593; NF-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte594; NF-NEXT:    retq # encoding: [0xc3]595  %a = load i32, ptr %ptr596  %v0 = and i32 %a, %b  ; 0xff << 50597  %v1 = icmp eq i32 %v0, 0598  store i32 %v0, ptr @d64599  ret i1 %v1600}601 602define i1 @andflag64rm(ptr %ptr, i64 %b) {603; CHECK-LABEL: andflag64rm:604; CHECK:       # %bb.0:605; CHECK-NEXT:    andq (%rdi), %rsi # EVEX TO LEGACY Compression encoding: [0x48,0x23,0x37]606; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]607; CHECK-NEXT:    movq %rsi, d64(%rip) # encoding: [0x48,0x89,0x35,A,A,A,A]608; CHECK-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte609; CHECK-NEXT:    retq # encoding: [0xc3]610;611; NF-LABEL: andflag64rm:612; NF:       # %bb.0:613; NF-NEXT:    andq (%rdi), %rsi # EVEX TO LEGACY Compression encoding: [0x48,0x23,0x37]614; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]615; NF-NEXT:    movq %rsi, d64(%rip) # encoding: [0x48,0x89,0x35,A,A,A,A]616; NF-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte617; NF-NEXT:    retq # encoding: [0xc3]618  %a = load i64, ptr %ptr619  %v0 = and i64 %a, %b  ; 0xff << 50620  %v1 = icmp eq i64 %v0, 0621  store i64 %v0, ptr @d64622  ret i1 %v1623}624 625define i1 @andflag8ri(i8 %a) {626; CHECK-LABEL: andflag8ri:627; CHECK:       # %bb.0:628; CHECK-NEXT:    andb $-124, %dil, %cl # encoding: [0x62,0xf4,0x74,0x18,0x80,0xe7,0x84]629; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]630; CHECK-NEXT:    movb %cl, d64(%rip) # encoding: [0x88,0x0d,A,A,A,A]631; CHECK-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte632; CHECK-NEXT:    retq # encoding: [0xc3]633;634; NF-LABEL: andflag8ri:635; NF:       # %bb.0:636; NF-NEXT:    andb $-124, %dil, %cl # encoding: [0x62,0xf4,0x74,0x18,0x80,0xe7,0x84]637; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]638; NF-NEXT:    movb %cl, d64(%rip) # encoding: [0x88,0x0d,A,A,A,A]639; NF-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte640; NF-NEXT:    retq # encoding: [0xc3]641  %xor = xor i8 123, -1642  %v0 = and i8 %a, %xor  ; 0xff << 50643  %v1 = icmp eq i8 %v0, 0644  store i8 %v0, ptr @d64645  ret i1 %v1646}647 648define i1 @andflag16ri(i16 %a) {649; CHECK-LABEL: andflag16ri:650; CHECK:       # %bb.0:651; CHECK-NEXT:    andw $-1235, %di, %cx # encoding: [0x62,0xf4,0x75,0x18,0x81,0xe7,0x2d,0xfb]652; CHECK-NEXT:    # imm = 0xFB2D653; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]654; CHECK-NEXT:    movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]655; CHECK-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte656; CHECK-NEXT:    retq # encoding: [0xc3]657;658; NF-LABEL: andflag16ri:659; NF:       # %bb.0:660; NF-NEXT:    andw $-1235, %di, %cx # encoding: [0x62,0xf4,0x75,0x18,0x81,0xe7,0x2d,0xfb]661; NF-NEXT:    # imm = 0xFB2D662; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]663; NF-NEXT:    movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]664; NF-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte665; NF-NEXT:    retq # encoding: [0xc3]666  %xor = xor i16 1234, -1667  %v0 = and i16 %a, %xor  ; 0xff << 50668  %v1 = icmp eq i16 %v0, 0669  store i16 %v0, ptr @d64670  ret i1 %v1671}672 673define i1 @andflag32ri(i32 %a) {674; CHECK-LABEL: andflag32ri:675; CHECK:       # %bb.0:676; CHECK-NEXT:    andl $123456, %edi # EVEX TO LEGACY Compression encoding: [0x81,0xe7,0x40,0xe2,0x01,0x00]677; CHECK-NEXT:    # imm = 0x1E240678; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]679; CHECK-NEXT:    movl %edi, d64(%rip) # encoding: [0x89,0x3d,A,A,A,A]680; CHECK-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte681; CHECK-NEXT:    retq # encoding: [0xc3]682;683; NF-LABEL: andflag32ri:684; NF:       # %bb.0:685; NF-NEXT:    andl $123456, %edi # EVEX TO LEGACY Compression encoding: [0x81,0xe7,0x40,0xe2,0x01,0x00]686; NF-NEXT:    # imm = 0x1E240687; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]688; NF-NEXT:    movl %edi, d64(%rip) # encoding: [0x89,0x3d,A,A,A,A]689; NF-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte690; NF-NEXT:    retq # encoding: [0xc3]691  %v0 = and i32 %a, 123456  ; 0xff << 50692  %v1 = icmp eq i32 %v0, 0693  store i32 %v0, ptr @d64694  ret i1 %v1695}696 697define i1 @andflag64ri(i64 %a) {698; CHECK-LABEL: andflag64ri:699; CHECK:       # %bb.0:700; CHECK-NEXT:    andq $123456, %rdi # EVEX TO LEGACY Compression encoding: [0x48,0x81,0xe7,0x40,0xe2,0x01,0x00]701; CHECK-NEXT:    # imm = 0x1E240702; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]703; CHECK-NEXT:    movq %rdi, d64(%rip) # encoding: [0x48,0x89,0x3d,A,A,A,A]704; CHECK-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte705; CHECK-NEXT:    retq # encoding: [0xc3]706;707; NF-LABEL: andflag64ri:708; NF:       # %bb.0:709; NF-NEXT:    andq $123456, %rdi # EVEX TO LEGACY Compression encoding: [0x48,0x81,0xe7,0x40,0xe2,0x01,0x00]710; NF-NEXT:    # imm = 0x1E240711; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]712; NF-NEXT:    movq %rdi, d64(%rip) # encoding: [0x48,0x89,0x3d,A,A,A,A]713; NF-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte714; NF-NEXT:    retq # encoding: [0xc3]715  %v0 = and i64 %a, 123456  ; 0xff << 50716  %v1 = icmp eq i64 %v0, 0717  store i64 %v0, ptr @d64718  ret i1 %v1719}720 721define i1 @andflag16ri8(i16 %a) {722; CHECK-LABEL: andflag16ri8:723; CHECK:       # %bb.0:724; CHECK-NEXT:    andw $-124, %di, %cx # encoding: [0x62,0xf4,0x75,0x18,0x83,0xe7,0x84]725; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]726; CHECK-NEXT:    movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]727; CHECK-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte728; CHECK-NEXT:    retq # encoding: [0xc3]729;730; NF-LABEL: andflag16ri8:731; NF:       # %bb.0:732; NF-NEXT:    andw $-124, %di, %cx # encoding: [0x62,0xf4,0x75,0x18,0x83,0xe7,0x84]733; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]734; NF-NEXT:    movw %cx, d64(%rip) # encoding: [0x66,0x89,0x0d,A,A,A,A]735; NF-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte736; NF-NEXT:    retq # encoding: [0xc3]737  %xor = xor i16 123, -1738  %v0 = and i16 %a, %xor  ; 0xff << 50739  %v1 = icmp eq i16 %v0, 0740  store i16 %v0, ptr @d64741  ret i1 %v1742}743 744define i1 @andflag32ri8(i32 %a) {745; CHECK-LABEL: andflag32ri8:746; CHECK:       # %bb.0:747; CHECK-NEXT:    andl $123, %edi # EVEX TO LEGACY Compression encoding: [0x83,0xe7,0x7b]748; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]749; CHECK-NEXT:    movl %edi, d64(%rip) # encoding: [0x89,0x3d,A,A,A,A]750; CHECK-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte751; CHECK-NEXT:    retq # encoding: [0xc3]752;753; NF-LABEL: andflag32ri8:754; NF:       # %bb.0:755; NF-NEXT:    andl $123, %edi # EVEX TO LEGACY Compression encoding: [0x83,0xe7,0x7b]756; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]757; NF-NEXT:    movl %edi, d64(%rip) # encoding: [0x89,0x3d,A,A,A,A]758; NF-NEXT:    # fixup A - offset: 2, value: d64, kind: reloc_riprel_4byte759; NF-NEXT:    retq # encoding: [0xc3]760  %v0 = and i32 %a, 123  ; 0xff << 50761  %v1 = icmp eq i32 %v0, 0762  store i32 %v0, ptr @d64763  ret i1 %v1764}765 766define i1 @andflag64ri8(i64 %a) {767; CHECK-LABEL: andflag64ri8:768; CHECK:       # %bb.0:769; CHECK-NEXT:    andq $123, %rdi # EVEX TO LEGACY Compression encoding: [0x48,0x83,0xe7,0x7b]770; CHECK-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]771; CHECK-NEXT:    movq %rdi, d64(%rip) # encoding: [0x48,0x89,0x3d,A,A,A,A]772; CHECK-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte773; CHECK-NEXT:    retq # encoding: [0xc3]774;775; NF-LABEL: andflag64ri8:776; NF:       # %bb.0:777; NF-NEXT:    andq $123, %rdi # EVEX TO LEGACY Compression encoding: [0x48,0x83,0xe7,0x7b]778; NF-NEXT:    sete %al # encoding: [0x0f,0x94,0xc0]779; NF-NEXT:    movq %rdi, d64(%rip) # encoding: [0x48,0x89,0x3d,A,A,A,A]780; NF-NEXT:    # fixup A - offset: 3, value: d64, kind: reloc_riprel_4byte781; NF-NEXT:    retq # encoding: [0xc3]782  %v0 = and i64 %a, 123  ; 0xff << 50783  %v1 = icmp eq i64 %v0, 0784  store i64 %v0, ptr @d64785  ret i1 %v1786}787 788define void @and8mr_legacy(ptr %a, i8 noundef %b) {789; CHECK-LABEL: and8mr_legacy:790; CHECK:       # %bb.0: # %entry791; CHECK-NEXT:    andb %sil, (%rdi) # encoding: [0x40,0x20,0x37]792; CHECK-NEXT:    retq # encoding: [0xc3]793;794; NF-LABEL: and8mr_legacy:795; NF:       # %bb.0: # %entry796; NF-NEXT:    andb %sil, (%rdi) # encoding: [0x40,0x20,0x37]797; NF-NEXT:    retq # encoding: [0xc3]798entry:799  %t= load i8, ptr %a800  %and = and i8 %t, %b801  store i8 %and, ptr %a802  ret void803}804 805define void @and16mr_legacy(ptr %a, i16 noundef %b) {806; CHECK-LABEL: and16mr_legacy:807; CHECK:       # %bb.0: # %entry808; CHECK-NEXT:    andw %si, (%rdi) # encoding: [0x66,0x21,0x37]809; CHECK-NEXT:    retq # encoding: [0xc3]810;811; NF-LABEL: and16mr_legacy:812; NF:       # %bb.0: # %entry813; NF-NEXT:    andw %si, (%rdi) # encoding: [0x66,0x21,0x37]814; NF-NEXT:    retq # encoding: [0xc3]815entry:816  %t= load i16, ptr %a817  %and = and i16 %t, %b818  store i16 %and, ptr %a819  ret void820}821 822define void @and32mr_legacy(ptr %a, i32 noundef %b) {823; CHECK-LABEL: and32mr_legacy:824; CHECK:       # %bb.0: # %entry825; CHECK-NEXT:    andl %esi, (%rdi) # encoding: [0x21,0x37]826; CHECK-NEXT:    retq # encoding: [0xc3]827;828; NF-LABEL: and32mr_legacy:829; NF:       # %bb.0: # %entry830; NF-NEXT:    andl %esi, (%rdi) # encoding: [0x21,0x37]831; NF-NEXT:    retq # encoding: [0xc3]832entry:833  %t= load i32, ptr %a834  %and = and i32 %t, %b835  store i32 %and, ptr %a836  ret void837}838 839define void @and64mr_legacy(ptr %a, i64 noundef %b) {840; CHECK-LABEL: and64mr_legacy:841; CHECK:       # %bb.0: # %entry842; CHECK-NEXT:    andq %rsi, (%rdi) # encoding: [0x48,0x21,0x37]843; CHECK-NEXT:    retq # encoding: [0xc3]844;845; NF-LABEL: and64mr_legacy:846; NF:       # %bb.0: # %entry847; NF-NEXT:    andq %rsi, (%rdi) # encoding: [0x48,0x21,0x37]848; NF-NEXT:    retq # encoding: [0xc3]849entry:850  %t= load i64, ptr %a851  %and = and i64 %t, %b852  store i64 %and, ptr %a853  ret void854}855 856define void @and8mi_legacy(ptr %a) {857; CHECK-LABEL: and8mi_legacy:858; CHECK:       # %bb.0: # %entry859; CHECK-NEXT:    andb $123, (%rdi) # encoding: [0x80,0x27,0x7b]860; CHECK-NEXT:    retq # encoding: [0xc3]861;862; NF-LABEL: and8mi_legacy:863; NF:       # %bb.0: # %entry864; NF-NEXT:    andb $123, (%rdi) # encoding: [0x80,0x27,0x7b]865; NF-NEXT:    retq # encoding: [0xc3]866entry:867  %t= load i8, ptr %a868  %and = and i8 %t, 123869  store i8 %and, ptr %a870  ret void871}872 873define void @and16mi_legacy(ptr %a) {874; CHECK-LABEL: and16mi_legacy:875; CHECK:       # %bb.0: # %entry876; CHECK-NEXT:    andw $1234, (%rdi) # encoding: [0x66,0x81,0x27,0xd2,0x04]877; CHECK-NEXT:    # imm = 0x4D2878; CHECK-NEXT:    retq # encoding: [0xc3]879;880; NF-LABEL: and16mi_legacy:881; NF:       # %bb.0: # %entry882; NF-NEXT:    andw $1234, (%rdi) # encoding: [0x66,0x81,0x27,0xd2,0x04]883; NF-NEXT:    # imm = 0x4D2884; NF-NEXT:    retq # encoding: [0xc3]885entry:886  %t= load i16, ptr %a887  %and = and i16 %t, 1234888  store i16 %and, ptr %a889  ret void890}891 892define void @and32mi_legacy(ptr %a) {893; CHECK-LABEL: and32mi_legacy:894; CHECK:       # %bb.0: # %entry895; CHECK-NEXT:    andl $123456, (%rdi) # encoding: [0x81,0x27,0x40,0xe2,0x01,0x00]896; CHECK-NEXT:    # imm = 0x1E240897; CHECK-NEXT:    retq # encoding: [0xc3]898;899; NF-LABEL: and32mi_legacy:900; NF:       # %bb.0: # %entry901; NF-NEXT:    andl $123456, (%rdi) # encoding: [0x81,0x27,0x40,0xe2,0x01,0x00]902; NF-NEXT:    # imm = 0x1E240903; NF-NEXT:    retq # encoding: [0xc3]904entry:905  %t= load i32, ptr %a906  %and = and i32 %t, 123456907  store i32 %and, ptr %a908  ret void909}910 911define void @and64mi_legacy(ptr %a) {912; CHECK-LABEL: and64mi_legacy:913; CHECK:       # %bb.0: # %entry914; CHECK-NEXT:    andq $123456, (%rdi) # encoding: [0x48,0x81,0x27,0x40,0xe2,0x01,0x00]915; CHECK-NEXT:    # imm = 0x1E240916; CHECK-NEXT:    retq # encoding: [0xc3]917;918; NF-LABEL: and64mi_legacy:919; NF:       # %bb.0: # %entry920; NF-NEXT:    andq $123456, (%rdi) # encoding: [0x48,0x81,0x27,0x40,0xe2,0x01,0x00]921; NF-NEXT:    # imm = 0x1E240922; NF-NEXT:    retq # encoding: [0xc3]923entry:924  %t= load i64, ptr %a925  %and = and i64 %t, 123456926  store i64 %and, ptr %a927  ret void928}929