brintos

brintos / llvm-project-archived public Read only

0
0
Text · 48.3 KiB · ba33ed7 Raw
1557 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \3; RUN:   | FileCheck -check-prefix=RV32I %s4; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \5; RUN:   | FileCheck -check-prefix=RV64I %s6; RUN: llc -mtriple=riscv32 -mattr=+zicbop -verify-machineinstrs < %s \7; RUN:   | FileCheck -check-prefix=RV32ZICBOP %s8; RUN: llc -mtriple=riscv64 -mattr=+zicbop -verify-machineinstrs < %s \9; RUN:   | FileCheck -check-prefix=RV64ZICBOP %s10; RUN: llc -mtriple=riscv64 -mattr=+zicbop,+zihintntl -verify-machineinstrs < %s \11; RUN:   | FileCheck -check-prefix=RV64ZICBOPZIHINTNTL %s12 13define void @test_prefetch_read_locality_0(ptr %a) nounwind {14; RV32I-LABEL: test_prefetch_read_locality_0:15; RV32I:       # %bb.0:16; RV32I-NEXT:    ret17;18; RV64I-LABEL: test_prefetch_read_locality_0:19; RV64I:       # %bb.0:20; RV64I-NEXT:    ret21;22; RV32ZICBOP-LABEL: test_prefetch_read_locality_0:23; RV32ZICBOP:       # %bb.0:24; RV32ZICBOP-NEXT:    prefetch.r 0(a0)25; RV32ZICBOP-NEXT:    ret26;27; RV64ZICBOP-LABEL: test_prefetch_read_locality_0:28; RV64ZICBOP:       # %bb.0:29; RV64ZICBOP-NEXT:    prefetch.r 0(a0)30; RV64ZICBOP-NEXT:    ret31;32; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_read_locality_0:33; RV64ZICBOPZIHINTNTL:       # %bb.0:34; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all35; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)36; RV64ZICBOPZIHINTNTL-NEXT:    ret37  call void @llvm.prefetch(ptr %a, i32 0, i32 0, i32 1)38  ret void39}40 41define void @test_prefetch_write_locality_0(ptr %a) nounwind {42; RV32I-LABEL: test_prefetch_write_locality_0:43; RV32I:       # %bb.0:44; RV32I-NEXT:    ret45;46; RV64I-LABEL: test_prefetch_write_locality_0:47; RV64I:       # %bb.0:48; RV64I-NEXT:    ret49;50; RV32ZICBOP-LABEL: test_prefetch_write_locality_0:51; RV32ZICBOP:       # %bb.0:52; RV32ZICBOP-NEXT:    prefetch.w 0(a0)53; RV32ZICBOP-NEXT:    ret54;55; RV64ZICBOP-LABEL: test_prefetch_write_locality_0:56; RV64ZICBOP:       # %bb.0:57; RV64ZICBOP-NEXT:    prefetch.w 0(a0)58; RV64ZICBOP-NEXT:    ret59;60; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_write_locality_0:61; RV64ZICBOPZIHINTNTL:       # %bb.0:62; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all63; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.w 0(a0)64; RV64ZICBOPZIHINTNTL-NEXT:    ret65  call void @llvm.prefetch(ptr %a, i32 1, i32 0, i32 1)66  ret void67}68 69define void @test_prefetch_instruction_locality_0(ptr %a) nounwind {70; RV32I-LABEL: test_prefetch_instruction_locality_0:71; RV32I:       # %bb.0:72; RV32I-NEXT:    ret73;74; RV64I-LABEL: test_prefetch_instruction_locality_0:75; RV64I:       # %bb.0:76; RV64I-NEXT:    ret77;78; RV32ZICBOP-LABEL: test_prefetch_instruction_locality_0:79; RV32ZICBOP:       # %bb.0:80; RV32ZICBOP-NEXT:    prefetch.i 0(a0)81; RV32ZICBOP-NEXT:    ret82;83; RV64ZICBOP-LABEL: test_prefetch_instruction_locality_0:84; RV64ZICBOP:       # %bb.0:85; RV64ZICBOP-NEXT:    prefetch.i 0(a0)86; RV64ZICBOP-NEXT:    ret87;88; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_instruction_locality_0:89; RV64ZICBOPZIHINTNTL:       # %bb.0:90; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all91; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.i 0(a0)92; RV64ZICBOPZIHINTNTL-NEXT:    ret93  call void @llvm.prefetch(ptr %a, i32 0, i32 0, i32 0)94  ret void95}96 97define void @test_prefetch_read_locality_1(ptr %a) nounwind {98; RV32I-LABEL: test_prefetch_read_locality_1:99; RV32I:       # %bb.0:100; RV32I-NEXT:    ret101;102; RV64I-LABEL: test_prefetch_read_locality_1:103; RV64I:       # %bb.0:104; RV64I-NEXT:    ret105;106; RV32ZICBOP-LABEL: test_prefetch_read_locality_1:107; RV32ZICBOP:       # %bb.0:108; RV32ZICBOP-NEXT:    prefetch.r 0(a0)109; RV32ZICBOP-NEXT:    ret110;111; RV64ZICBOP-LABEL: test_prefetch_read_locality_1:112; RV64ZICBOP:       # %bb.0:113; RV64ZICBOP-NEXT:    prefetch.r 0(a0)114; RV64ZICBOP-NEXT:    ret115;116; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_read_locality_1:117; RV64ZICBOPZIHINTNTL:       # %bb.0:118; RV64ZICBOPZIHINTNTL-NEXT:    ntl.pall119; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)120; RV64ZICBOPZIHINTNTL-NEXT:    ret121  call void @llvm.prefetch(ptr %a, i32 0, i32 1, i32 1)122  ret void123}124 125define void @test_prefetch_write_locality_1(ptr %a) nounwind {126; RV32I-LABEL: test_prefetch_write_locality_1:127; RV32I:       # %bb.0:128; RV32I-NEXT:    ret129;130; RV64I-LABEL: test_prefetch_write_locality_1:131; RV64I:       # %bb.0:132; RV64I-NEXT:    ret133;134; RV32ZICBOP-LABEL: test_prefetch_write_locality_1:135; RV32ZICBOP:       # %bb.0:136; RV32ZICBOP-NEXT:    prefetch.w 0(a0)137; RV32ZICBOP-NEXT:    ret138;139; RV64ZICBOP-LABEL: test_prefetch_write_locality_1:140; RV64ZICBOP:       # %bb.0:141; RV64ZICBOP-NEXT:    prefetch.w 0(a0)142; RV64ZICBOP-NEXT:    ret143;144; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_write_locality_1:145; RV64ZICBOPZIHINTNTL:       # %bb.0:146; RV64ZICBOPZIHINTNTL-NEXT:    ntl.pall147; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.w 0(a0)148; RV64ZICBOPZIHINTNTL-NEXT:    ret149  call void @llvm.prefetch(ptr %a, i32 1, i32 1, i32 1)150  ret void151}152 153define void @test_prefetch_instruction_locality_1(ptr %a) nounwind {154; RV32I-LABEL: test_prefetch_instruction_locality_1:155; RV32I:       # %bb.0:156; RV32I-NEXT:    ret157;158; RV64I-LABEL: test_prefetch_instruction_locality_1:159; RV64I:       # %bb.0:160; RV64I-NEXT:    ret161;162; RV32ZICBOP-LABEL: test_prefetch_instruction_locality_1:163; RV32ZICBOP:       # %bb.0:164; RV32ZICBOP-NEXT:    prefetch.i 0(a0)165; RV32ZICBOP-NEXT:    ret166;167; RV64ZICBOP-LABEL: test_prefetch_instruction_locality_1:168; RV64ZICBOP:       # %bb.0:169; RV64ZICBOP-NEXT:    prefetch.i 0(a0)170; RV64ZICBOP-NEXT:    ret171;172; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_instruction_locality_1:173; RV64ZICBOPZIHINTNTL:       # %bb.0:174; RV64ZICBOPZIHINTNTL-NEXT:    ntl.pall175; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.i 0(a0)176; RV64ZICBOPZIHINTNTL-NEXT:    ret177  call void @llvm.prefetch(ptr %a, i32 0, i32 1, i32 0)178  ret void179}180 181define void @test_prefetch_read_locality_2(ptr %a) nounwind {182; RV32I-LABEL: test_prefetch_read_locality_2:183; RV32I:       # %bb.0:184; RV32I-NEXT:    ret185;186; RV64I-LABEL: test_prefetch_read_locality_2:187; RV64I:       # %bb.0:188; RV64I-NEXT:    ret189;190; RV32ZICBOP-LABEL: test_prefetch_read_locality_2:191; RV32ZICBOP:       # %bb.0:192; RV32ZICBOP-NEXT:    prefetch.r 0(a0)193; RV32ZICBOP-NEXT:    ret194;195; RV64ZICBOP-LABEL: test_prefetch_read_locality_2:196; RV64ZICBOP:       # %bb.0:197; RV64ZICBOP-NEXT:    prefetch.r 0(a0)198; RV64ZICBOP-NEXT:    ret199;200; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_read_locality_2:201; RV64ZICBOPZIHINTNTL:       # %bb.0:202; RV64ZICBOPZIHINTNTL-NEXT:    ntl.p1203; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)204; RV64ZICBOPZIHINTNTL-NEXT:    ret205  call void @llvm.prefetch(ptr %a, i32 0, i32 2, i32 1)206  ret void207}208 209define void @test_prefetch_write_locality_2(ptr %a) nounwind {210; RV32I-LABEL: test_prefetch_write_locality_2:211; RV32I:       # %bb.0:212; RV32I-NEXT:    ret213;214; RV64I-LABEL: test_prefetch_write_locality_2:215; RV64I:       # %bb.0:216; RV64I-NEXT:    ret217;218; RV32ZICBOP-LABEL: test_prefetch_write_locality_2:219; RV32ZICBOP:       # %bb.0:220; RV32ZICBOP-NEXT:    prefetch.w 0(a0)221; RV32ZICBOP-NEXT:    ret222;223; RV64ZICBOP-LABEL: test_prefetch_write_locality_2:224; RV64ZICBOP:       # %bb.0:225; RV64ZICBOP-NEXT:    prefetch.w 0(a0)226; RV64ZICBOP-NEXT:    ret227;228; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_write_locality_2:229; RV64ZICBOPZIHINTNTL:       # %bb.0:230; RV64ZICBOPZIHINTNTL-NEXT:    ntl.p1231; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.w 0(a0)232; RV64ZICBOPZIHINTNTL-NEXT:    ret233  call void @llvm.prefetch(ptr %a, i32 1, i32 2, i32 1)234  ret void235}236 237define void @test_prefetch_instruction_locality_2(ptr %a) nounwind {238; RV32I-LABEL: test_prefetch_instruction_locality_2:239; RV32I:       # %bb.0:240; RV32I-NEXT:    ret241;242; RV64I-LABEL: test_prefetch_instruction_locality_2:243; RV64I:       # %bb.0:244; RV64I-NEXT:    ret245;246; RV32ZICBOP-LABEL: test_prefetch_instruction_locality_2:247; RV32ZICBOP:       # %bb.0:248; RV32ZICBOP-NEXT:    prefetch.i 0(a0)249; RV32ZICBOP-NEXT:    ret250;251; RV64ZICBOP-LABEL: test_prefetch_instruction_locality_2:252; RV64ZICBOP:       # %bb.0:253; RV64ZICBOP-NEXT:    prefetch.i 0(a0)254; RV64ZICBOP-NEXT:    ret255;256; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_instruction_locality_2:257; RV64ZICBOPZIHINTNTL:       # %bb.0:258; RV64ZICBOPZIHINTNTL-NEXT:    ntl.p1259; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.i 0(a0)260; RV64ZICBOPZIHINTNTL-NEXT:    ret261  call void @llvm.prefetch(ptr %a, i32 0, i32 2, i32 0)262  ret void263}264 265define void @test_prefetch_read_locality_3(ptr %a) nounwind {266; RV32I-LABEL: test_prefetch_read_locality_3:267; RV32I:       # %bb.0:268; RV32I-NEXT:    ret269;270; RV64I-LABEL: test_prefetch_read_locality_3:271; RV64I:       # %bb.0:272; RV64I-NEXT:    ret273;274; RV32ZICBOP-LABEL: test_prefetch_read_locality_3:275; RV32ZICBOP:       # %bb.0:276; RV32ZICBOP-NEXT:    prefetch.r 0(a0)277; RV32ZICBOP-NEXT:    ret278;279; RV64ZICBOP-LABEL: test_prefetch_read_locality_3:280; RV64ZICBOP:       # %bb.0:281; RV64ZICBOP-NEXT:    prefetch.r 0(a0)282; RV64ZICBOP-NEXT:    ret283;284; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_read_locality_3:285; RV64ZICBOPZIHINTNTL:       # %bb.0:286; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)287; RV64ZICBOPZIHINTNTL-NEXT:    ret288  call void @llvm.prefetch(ptr %a, i32 0, i32 3, i32 1)289  ret void290}291 292define void @test_prefetch_write_locality_3(ptr %a) nounwind {293; RV32I-LABEL: test_prefetch_write_locality_3:294; RV32I:       # %bb.0:295; RV32I-NEXT:    ret296;297; RV64I-LABEL: test_prefetch_write_locality_3:298; RV64I:       # %bb.0:299; RV64I-NEXT:    ret300;301; RV32ZICBOP-LABEL: test_prefetch_write_locality_3:302; RV32ZICBOP:       # %bb.0:303; RV32ZICBOP-NEXT:    prefetch.w 0(a0)304; RV32ZICBOP-NEXT:    ret305;306; RV64ZICBOP-LABEL: test_prefetch_write_locality_3:307; RV64ZICBOP:       # %bb.0:308; RV64ZICBOP-NEXT:    prefetch.w 0(a0)309; RV64ZICBOP-NEXT:    ret310;311; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_write_locality_3:312; RV64ZICBOPZIHINTNTL:       # %bb.0:313; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.w 0(a0)314; RV64ZICBOPZIHINTNTL-NEXT:    ret315  call void @llvm.prefetch(ptr %a, i32 1, i32 3, i32 1)316  ret void317}318 319define void @test_prefetch_instruction_locality_3(ptr %a) nounwind {320; RV32I-LABEL: test_prefetch_instruction_locality_3:321; RV32I:       # %bb.0:322; RV32I-NEXT:    ret323;324; RV64I-LABEL: test_prefetch_instruction_locality_3:325; RV64I:       # %bb.0:326; RV64I-NEXT:    ret327;328; RV32ZICBOP-LABEL: test_prefetch_instruction_locality_3:329; RV32ZICBOP:       # %bb.0:330; RV32ZICBOP-NEXT:    prefetch.i 0(a0)331; RV32ZICBOP-NEXT:    ret332;333; RV64ZICBOP-LABEL: test_prefetch_instruction_locality_3:334; RV64ZICBOP:       # %bb.0:335; RV64ZICBOP-NEXT:    prefetch.i 0(a0)336; RV64ZICBOP-NEXT:    ret337;338; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_instruction_locality_3:339; RV64ZICBOPZIHINTNTL:       # %bb.0:340; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.i 0(a0)341; RV64ZICBOPZIHINTNTL-NEXT:    ret342  call void @llvm.prefetch(ptr %a, i32 0, i32 3, i32 0)343  ret void344}345 346define void @test_prefetch_offsetable_0(ptr %a) nounwind {347; RV32I-LABEL: test_prefetch_offsetable_0:348; RV32I:       # %bb.0:349; RV32I-NEXT:    ret350;351; RV64I-LABEL: test_prefetch_offsetable_0:352; RV64I:       # %bb.0:353; RV64I-NEXT:    ret354;355; RV32ZICBOP-LABEL: test_prefetch_offsetable_0:356; RV32ZICBOP:       # %bb.0:357; RV32ZICBOP-NEXT:    prefetch.r 2016(a0)358; RV32ZICBOP-NEXT:    ret359;360; RV64ZICBOP-LABEL: test_prefetch_offsetable_0:361; RV64ZICBOP:       # %bb.0:362; RV64ZICBOP-NEXT:    prefetch.r 2016(a0)363; RV64ZICBOP-NEXT:    ret364;365; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_offsetable_0:366; RV64ZICBOPZIHINTNTL:       # %bb.0:367; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all368; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 2016(a0)369; RV64ZICBOPZIHINTNTL-NEXT:    ret370  %addr = getelementptr i8, ptr %a, i64 2016371  call void @llvm.prefetch(ptr %addr, i32 0, i32 0, i32 1)372  ret void373}374 375define void @test_prefetch_offsetable_1(ptr %a) nounwind {376; RV32I-LABEL: test_prefetch_offsetable_1:377; RV32I:       # %bb.0:378; RV32I-NEXT:    ret379;380; RV64I-LABEL: test_prefetch_offsetable_1:381; RV64I:       # %bb.0:382; RV64I-NEXT:    ret383;384; RV32ZICBOP-LABEL: test_prefetch_offsetable_1:385; RV32ZICBOP:       # %bb.0:386; RV32ZICBOP-NEXT:    prefetch.r -2048(a0)387; RV32ZICBOP-NEXT:    ret388;389; RV64ZICBOP-LABEL: test_prefetch_offsetable_1:390; RV64ZICBOP:       # %bb.0:391; RV64ZICBOP-NEXT:    prefetch.r -2048(a0)392; RV64ZICBOP-NEXT:    ret393;394; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_offsetable_1:395; RV64ZICBOPZIHINTNTL:       # %bb.0:396; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all397; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r -2048(a0)398; RV64ZICBOPZIHINTNTL-NEXT:    ret399  %addr = getelementptr i8, ptr %a, i64 -2048400  call void @llvm.prefetch(ptr %addr, i32 0, i32 0, i32 1)401  ret void402}403 404define void @test_prefetch_offsetable_2(ptr %a) nounwind {405; RV32I-LABEL: test_prefetch_offsetable_2:406; RV32I:       # %bb.0:407; RV32I-NEXT:    ret408;409; RV64I-LABEL: test_prefetch_offsetable_2:410; RV64I:       # %bb.0:411; RV64I-NEXT:    ret412;413; RV32ZICBOP-LABEL: test_prefetch_offsetable_2:414; RV32ZICBOP:       # %bb.0:415; RV32ZICBOP-NEXT:    prefetch.r 32(a0)416; RV32ZICBOP-NEXT:    ret417;418; RV64ZICBOP-LABEL: test_prefetch_offsetable_2:419; RV64ZICBOP:       # %bb.0:420; RV64ZICBOP-NEXT:    prefetch.r 32(a0)421; RV64ZICBOP-NEXT:    ret422;423; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_offsetable_2:424; RV64ZICBOPZIHINTNTL:       # %bb.0:425; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all426; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 32(a0)427; RV64ZICBOPZIHINTNTL-NEXT:    ret428  %addr = getelementptr i8, ptr %a, i64 32429  call void @llvm.prefetch(ptr %addr, i32 0, i32 0, i32 1)430  ret void431}432 433define void @test_prefetch_offsetable_3(ptr %a) nounwind {434; RV32I-LABEL: test_prefetch_offsetable_3:435; RV32I:       # %bb.0:436; RV32I-NEXT:    ret437;438; RV64I-LABEL: test_prefetch_offsetable_3:439; RV64I:       # %bb.0:440; RV64I-NEXT:    ret441;442; RV32ZICBOP-LABEL: test_prefetch_offsetable_3:443; RV32ZICBOP:       # %bb.0:444; RV32ZICBOP-NEXT:    prefetch.r -32(a0)445; RV32ZICBOP-NEXT:    ret446;447; RV64ZICBOP-LABEL: test_prefetch_offsetable_3:448; RV64ZICBOP:       # %bb.0:449; RV64ZICBOP-NEXT:    prefetch.r -32(a0)450; RV64ZICBOP-NEXT:    ret451;452; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_offsetable_3:453; RV64ZICBOPZIHINTNTL:       # %bb.0:454; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all455; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r -32(a0)456; RV64ZICBOPZIHINTNTL-NEXT:    ret457  %addr = getelementptr i8, ptr %a, i64 -32458  call void @llvm.prefetch(ptr %addr, i32 0, i32 0, i32 1)459  ret void460}461 462define void @test_prefetch_offsetable_4(ptr %a) nounwind {463; RV32I-LABEL: test_prefetch_offsetable_4:464; RV32I:       # %bb.0:465; RV32I-NEXT:    ret466;467; RV64I-LABEL: test_prefetch_offsetable_4:468; RV64I:       # %bb.0:469; RV64I-NEXT:    ret470;471; RV32ZICBOP-LABEL: test_prefetch_offsetable_4:472; RV32ZICBOP:       # %bb.0:473; RV32ZICBOP-NEXT:    addi a0, a0, 32474; RV32ZICBOP-NEXT:    prefetch.r 2016(a0)475; RV32ZICBOP-NEXT:    ret476;477; RV64ZICBOP-LABEL: test_prefetch_offsetable_4:478; RV64ZICBOP:       # %bb.0:479; RV64ZICBOP-NEXT:    addi a0, a0, 32480; RV64ZICBOP-NEXT:    prefetch.r 2016(a0)481; RV64ZICBOP-NEXT:    ret482;483; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_offsetable_4:484; RV64ZICBOPZIHINTNTL:       # %bb.0:485; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, 32486; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all487; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 2016(a0)488; RV64ZICBOPZIHINTNTL-NEXT:    ret489  %addr = getelementptr i8, ptr %a, i64 2048490  call void @llvm.prefetch(ptr %addr, i32 0, i32 0, i32 1)491  ret void492}493 494define void @test_prefetch_offsetable_5(ptr %a) nounwind {495; RV32I-LABEL: test_prefetch_offsetable_5:496; RV32I:       # %bb.0:497; RV32I-NEXT:    ret498;499; RV64I-LABEL: test_prefetch_offsetable_5:500; RV64I:       # %bb.0:501; RV64I-NEXT:    ret502;503; RV32ZICBOP-LABEL: test_prefetch_offsetable_5:504; RV32ZICBOP:       # %bb.0:505; RV32ZICBOP-NEXT:    addi a0, a0, -1506; RV32ZICBOP-NEXT:    prefetch.r -2048(a0)507; RV32ZICBOP-NEXT:    ret508;509; RV64ZICBOP-LABEL: test_prefetch_offsetable_5:510; RV64ZICBOP:       # %bb.0:511; RV64ZICBOP-NEXT:    addi a0, a0, -1512; RV64ZICBOP-NEXT:    prefetch.r -2048(a0)513; RV64ZICBOP-NEXT:    ret514;515; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_offsetable_5:516; RV64ZICBOPZIHINTNTL:       # %bb.0:517; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, -1518; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all519; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r -2048(a0)520; RV64ZICBOPZIHINTNTL-NEXT:    ret521  %addr = getelementptr i8, ptr %a, i64 -2049522  call void @llvm.prefetch(ptr %addr, i32 0, i32 0, i32 1)523  ret void524}525 526define void @test_prefetch_offsetable_6(ptr %a) nounwind {527; RV32I-LABEL: test_prefetch_offsetable_6:528; RV32I:       # %bb.0:529; RV32I-NEXT:    ret530;531; RV64I-LABEL: test_prefetch_offsetable_6:532; RV64I:       # %bb.0:533; RV64I-NEXT:    ret534;535; RV32ZICBOP-LABEL: test_prefetch_offsetable_6:536; RV32ZICBOP:       # %bb.0:537; RV32ZICBOP-NEXT:    addi a0, a0, 16538; RV32ZICBOP-NEXT:    prefetch.r 0(a0)539; RV32ZICBOP-NEXT:    ret540;541; RV64ZICBOP-LABEL: test_prefetch_offsetable_6:542; RV64ZICBOP:       # %bb.0:543; RV64ZICBOP-NEXT:    addi a0, a0, 16544; RV64ZICBOP-NEXT:    prefetch.r 0(a0)545; RV64ZICBOP-NEXT:    ret546;547; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_offsetable_6:548; RV64ZICBOPZIHINTNTL:       # %bb.0:549; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, 16550; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all551; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)552; RV64ZICBOPZIHINTNTL-NEXT:    ret553  %addr = getelementptr i8, ptr %a, i64 16554  call void @llvm.prefetch(ptr %addr, i32 0, i32 0, i32 1)555  ret void556}557 558define void @test_prefetch_offsetable_7(ptr %a) nounwind {559; RV32I-LABEL: test_prefetch_offsetable_7:560; RV32I:       # %bb.0:561; RV32I-NEXT:    ret562;563; RV64I-LABEL: test_prefetch_offsetable_7:564; RV64I:       # %bb.0:565; RV64I-NEXT:    ret566;567; RV32ZICBOP-LABEL: test_prefetch_offsetable_7:568; RV32ZICBOP:       # %bb.0:569; RV32ZICBOP-NEXT:    addi a0, a0, -16570; RV32ZICBOP-NEXT:    prefetch.r 0(a0)571; RV32ZICBOP-NEXT:    ret572;573; RV64ZICBOP-LABEL: test_prefetch_offsetable_7:574; RV64ZICBOP:       # %bb.0:575; RV64ZICBOP-NEXT:    addi a0, a0, -16576; RV64ZICBOP-NEXT:    prefetch.r 0(a0)577; RV64ZICBOP-NEXT:    ret578;579; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_offsetable_7:580; RV64ZICBOPZIHINTNTL:       # %bb.0:581; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, -16582; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all583; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)584; RV64ZICBOPZIHINTNTL-NEXT:    ret585  %addr = getelementptr i8, ptr %a, i64 -16586  call void @llvm.prefetch(ptr %addr, i32 0, i32 0, i32 1)587  ret void588}589 590define void @test_prefetch_offsetable_9(ptr %a) nounwind {591; RV32I-LABEL: test_prefetch_offsetable_9:592; RV32I:       # %bb.0:593; RV32I-NEXT:    ret594;595; RV64I-LABEL: test_prefetch_offsetable_9:596; RV64I:       # %bb.0:597; RV64I-NEXT:    ret598;599; RV32ZICBOP-LABEL: test_prefetch_offsetable_9:600; RV32ZICBOP:       # %bb.0:601; RV32ZICBOP-NEXT:    lui a1, 1602; RV32ZICBOP-NEXT:    add a0, a0, a1603; RV32ZICBOP-NEXT:    prefetch.r 64(a0)604; RV32ZICBOP-NEXT:    ret605;606; RV64ZICBOP-LABEL: test_prefetch_offsetable_9:607; RV64ZICBOP:       # %bb.0:608; RV64ZICBOP-NEXT:    lui a1, 1609; RV64ZICBOP-NEXT:    add a0, a0, a1610; RV64ZICBOP-NEXT:    prefetch.r 64(a0)611; RV64ZICBOP-NEXT:    ret612;613; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_offsetable_9:614; RV64ZICBOPZIHINTNTL:       # %bb.0:615; RV64ZICBOPZIHINTNTL-NEXT:    lui a1, 1616; RV64ZICBOPZIHINTNTL-NEXT:    add a0, a0, a1617; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all618; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 64(a0)619; RV64ZICBOPZIHINTNTL-NEXT:    ret620  %addr = getelementptr i8, ptr %a, i64 4160621  call void @llvm.prefetch(ptr %addr, i32 0, i32 0, i32 1)622  ret void623}624 625define void @test_prefetch_offsetable_8(ptr %a) nounwind {626; RV32I-LABEL: test_prefetch_offsetable_8:627; RV32I:       # %bb.0:628; RV32I-NEXT:    ret629;630; RV64I-LABEL: test_prefetch_offsetable_8:631; RV64I:       # %bb.0:632; RV64I-NEXT:    ret633;634; RV32ZICBOP-LABEL: test_prefetch_offsetable_8:635; RV32ZICBOP:       # %bb.0:636; RV32ZICBOP-NEXT:    lui a1, 1048575637; RV32ZICBOP-NEXT:    add a0, a0, a1638; RV32ZICBOP-NEXT:    prefetch.r -64(a0)639; RV32ZICBOP-NEXT:    ret640;641; RV64ZICBOP-LABEL: test_prefetch_offsetable_8:642; RV64ZICBOP:       # %bb.0:643; RV64ZICBOP-NEXT:    lui a1, 1048575644; RV64ZICBOP-NEXT:    add a0, a0, a1645; RV64ZICBOP-NEXT:    prefetch.r -64(a0)646; RV64ZICBOP-NEXT:    ret647;648; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_offsetable_8:649; RV64ZICBOPZIHINTNTL:       # %bb.0:650; RV64ZICBOPZIHINTNTL-NEXT:    lui a1, 1048575651; RV64ZICBOPZIHINTNTL-NEXT:    add a0, a0, a1652; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all653; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r -64(a0)654; RV64ZICBOPZIHINTNTL-NEXT:    ret655  %addr = getelementptr i8, ptr %a, i64 -4160656  call void @llvm.prefetch(ptr %addr, i32 0, i32 0, i32 1)657  ret void658}659 660define void @test_prefetch_frameindex_0() nounwind {661; RV32I-LABEL: test_prefetch_frameindex_0:662; RV32I:       # %bb.0:663; RV32I-NEXT:    addi sp, sp, -512664; RV32I-NEXT:    addi sp, sp, 512665; RV32I-NEXT:    ret666;667; RV64I-LABEL: test_prefetch_frameindex_0:668; RV64I:       # %bb.0:669; RV64I-NEXT:    addi sp, sp, -512670; RV64I-NEXT:    addi sp, sp, 512671; RV64I-NEXT:    ret672;673; RV32ZICBOP-LABEL: test_prefetch_frameindex_0:674; RV32ZICBOP:       # %bb.0:675; RV32ZICBOP-NEXT:    addi sp, sp, -512676; RV32ZICBOP-NEXT:    prefetch.r 0(sp)677; RV32ZICBOP-NEXT:    addi sp, sp, 512678; RV32ZICBOP-NEXT:    ret679;680; RV64ZICBOP-LABEL: test_prefetch_frameindex_0:681; RV64ZICBOP:       # %bb.0:682; RV64ZICBOP-NEXT:    addi sp, sp, -512683; RV64ZICBOP-NEXT:    prefetch.r 0(sp)684; RV64ZICBOP-NEXT:    addi sp, sp, 512685; RV64ZICBOP-NEXT:    ret686;687; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_frameindex_0:688; RV64ZICBOPZIHINTNTL:       # %bb.0:689; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, -512690; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all691; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(sp)692; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, 512693; RV64ZICBOPZIHINTNTL-NEXT:    ret694  %data = alloca [128 x i32], align 4695  %base = bitcast ptr %data to ptr696  %ptr = getelementptr [128 x i32], ptr %base, i32 0, i32 0697  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)698  ret void699}700 701define void @test_prefetch_frameindex_1() nounwind {702; RV32I-LABEL: test_prefetch_frameindex_1:703; RV32I:       # %bb.0:704; RV32I-NEXT:    lui a0, 1705; RV32I-NEXT:    addi a0, a0, 16706; RV32I-NEXT:    sub sp, sp, a0707; RV32I-NEXT:    lui a0, 1708; RV32I-NEXT:    addi a0, a0, 16709; RV32I-NEXT:    add sp, sp, a0710; RV32I-NEXT:    ret711;712; RV64I-LABEL: test_prefetch_frameindex_1:713; RV64I:       # %bb.0:714; RV64I-NEXT:    lui a0, 1715; RV64I-NEXT:    addi a0, a0, 16716; RV64I-NEXT:    sub sp, sp, a0717; RV64I-NEXT:    lui a0, 1718; RV64I-NEXT:    addi a0, a0, 16719; RV64I-NEXT:    add sp, sp, a0720; RV64I-NEXT:    ret721;722; RV32ZICBOP-LABEL: test_prefetch_frameindex_1:723; RV32ZICBOP:       # %bb.0:724; RV32ZICBOP-NEXT:    lui a0, 1725; RV32ZICBOP-NEXT:    addi a0, a0, 16726; RV32ZICBOP-NEXT:    sub sp, sp, a0727; RV32ZICBOP-NEXT:    addi a0, sp, 16728; RV32ZICBOP-NEXT:    prefetch.r 0(a0)729; RV32ZICBOP-NEXT:    lui a0, 1730; RV32ZICBOP-NEXT:    addi a0, a0, 16731; RV32ZICBOP-NEXT:    add sp, sp, a0732; RV32ZICBOP-NEXT:    ret733;734; RV64ZICBOP-LABEL: test_prefetch_frameindex_1:735; RV64ZICBOP:       # %bb.0:736; RV64ZICBOP-NEXT:    lui a0, 1737; RV64ZICBOP-NEXT:    addi a0, a0, 16738; RV64ZICBOP-NEXT:    sub sp, sp, a0739; RV64ZICBOP-NEXT:    addi a0, sp, 16740; RV64ZICBOP-NEXT:    prefetch.r 0(a0)741; RV64ZICBOP-NEXT:    lui a0, 1742; RV64ZICBOP-NEXT:    addi a0, a0, 16743; RV64ZICBOP-NEXT:    add sp, sp, a0744; RV64ZICBOP-NEXT:    ret745;746; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_frameindex_1:747; RV64ZICBOPZIHINTNTL:       # %bb.0:748; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, 1749; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, 16750; RV64ZICBOPZIHINTNTL-NEXT:    sub sp, sp, a0751; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, sp, 16752; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all753; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)754; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, 1755; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, 16756; RV64ZICBOPZIHINTNTL-NEXT:    add sp, sp, a0757; RV64ZICBOPZIHINTNTL-NEXT:    ret758  %data = alloca [1024 x i32], align 4759  %ptr = bitcast ptr %data to ptr760  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)761  ret void762}763 764define void @test_prefetch_frameindex_2() nounwind {765; RV32I-LABEL: test_prefetch_frameindex_2:766; RV32I:       # %bb.0:767; RV32I-NEXT:    addi sp, sp, -512768; RV32I-NEXT:    addi sp, sp, 512769; RV32I-NEXT:    ret770;771; RV64I-LABEL: test_prefetch_frameindex_2:772; RV64I:       # %bb.0:773; RV64I-NEXT:    addi sp, sp, -512774; RV64I-NEXT:    addi sp, sp, 512775; RV64I-NEXT:    ret776;777; RV32ZICBOP-LABEL: test_prefetch_frameindex_2:778; RV32ZICBOP:       # %bb.0:779; RV32ZICBOP-NEXT:    addi sp, sp, -512780; RV32ZICBOP-NEXT:    addi a0, sp, 16781; RV32ZICBOP-NEXT:    prefetch.r 0(a0)782; RV32ZICBOP-NEXT:    addi sp, sp, 512783; RV32ZICBOP-NEXT:    ret784;785; RV64ZICBOP-LABEL: test_prefetch_frameindex_2:786; RV64ZICBOP:       # %bb.0:787; RV64ZICBOP-NEXT:    addi sp, sp, -512788; RV64ZICBOP-NEXT:    addi a0, sp, 16789; RV64ZICBOP-NEXT:    prefetch.r 0(a0)790; RV64ZICBOP-NEXT:    addi sp, sp, 512791; RV64ZICBOP-NEXT:    ret792;793; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_frameindex_2:794; RV64ZICBOPZIHINTNTL:       # %bb.0:795; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, -512796; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, sp, 16797; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all798; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)799; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, 512800; RV64ZICBOPZIHINTNTL-NEXT:    ret801  %data = alloca [128 x i32], align 4802  %base = bitcast ptr %data to ptr803  %ptr = getelementptr [128 x i32], ptr %base, i32 0, i32 4804  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)805  ret void806}807 808define void @test_prefetch_frameindex_3() nounwind {809; RV32I-LABEL: test_prefetch_frameindex_3:810; RV32I:       # %bb.0:811; RV32I-NEXT:    addi sp, sp, -512812; RV32I-NEXT:    addi sp, sp, 512813; RV32I-NEXT:    ret814;815; RV64I-LABEL: test_prefetch_frameindex_3:816; RV64I:       # %bb.0:817; RV64I-NEXT:    addi sp, sp, -512818; RV64I-NEXT:    addi sp, sp, 512819; RV64I-NEXT:    ret820;821; RV32ZICBOP-LABEL: test_prefetch_frameindex_3:822; RV32ZICBOP:       # %bb.0:823; RV32ZICBOP-NEXT:    addi sp, sp, -512824; RV32ZICBOP-NEXT:    addi a0, sp, -16825; RV32ZICBOP-NEXT:    prefetch.r 0(a0)826; RV32ZICBOP-NEXT:    addi sp, sp, 512827; RV32ZICBOP-NEXT:    ret828;829; RV64ZICBOP-LABEL: test_prefetch_frameindex_3:830; RV64ZICBOP:       # %bb.0:831; RV64ZICBOP-NEXT:    addi sp, sp, -512832; RV64ZICBOP-NEXT:    addi a0, sp, -16833; RV64ZICBOP-NEXT:    prefetch.r 0(a0)834; RV64ZICBOP-NEXT:    addi sp, sp, 512835; RV64ZICBOP-NEXT:    ret836;837; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_frameindex_3:838; RV64ZICBOPZIHINTNTL:       # %bb.0:839; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, -512840; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, sp, -16841; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all842; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)843; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, 512844; RV64ZICBOPZIHINTNTL-NEXT:    ret845  %data = alloca [128 x i32], align 4846  %base = bitcast ptr %data to ptr847  %ptr = getelementptr [128 x i32], ptr %base, i32 0, i32 -4848  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)849  ret void850}851 852define void @test_prefetch_frameindex_4() nounwind {853; RV32I-LABEL: test_prefetch_frameindex_4:854; RV32I:       # %bb.0:855; RV32I-NEXT:    addi sp, sp, -512856; RV32I-NEXT:    addi sp, sp, 512857; RV32I-NEXT:    ret858;859; RV64I-LABEL: test_prefetch_frameindex_4:860; RV64I:       # %bb.0:861; RV64I-NEXT:    addi sp, sp, -512862; RV64I-NEXT:    addi sp, sp, 512863; RV64I-NEXT:    ret864;865; RV32ZICBOP-LABEL: test_prefetch_frameindex_4:866; RV32ZICBOP:       # %bb.0:867; RV32ZICBOP-NEXT:    addi sp, sp, -512868; RV32ZICBOP-NEXT:    prefetch.r 32(sp)869; RV32ZICBOP-NEXT:    addi sp, sp, 512870; RV32ZICBOP-NEXT:    ret871;872; RV64ZICBOP-LABEL: test_prefetch_frameindex_4:873; RV64ZICBOP:       # %bb.0:874; RV64ZICBOP-NEXT:    addi sp, sp, -512875; RV64ZICBOP-NEXT:    prefetch.r 32(sp)876; RV64ZICBOP-NEXT:    addi sp, sp, 512877; RV64ZICBOP-NEXT:    ret878;879; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_frameindex_4:880; RV64ZICBOPZIHINTNTL:       # %bb.0:881; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, -512882; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all883; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 32(sp)884; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, 512885; RV64ZICBOPZIHINTNTL-NEXT:    ret886  %data = alloca [128 x i32], align 4887  %base = bitcast ptr %data to ptr888  %ptr = getelementptr [128 x i32], ptr %base, i32 0, i32 8889  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)890  ret void891}892 893define void @test_prefetch_frameindex_5() nounwind {894; RV32I-LABEL: test_prefetch_frameindex_5:895; RV32I:       # %bb.0:896; RV32I-NEXT:    addi sp, sp, -512897; RV32I-NEXT:    addi sp, sp, 512898; RV32I-NEXT:    ret899;900; RV64I-LABEL: test_prefetch_frameindex_5:901; RV64I:       # %bb.0:902; RV64I-NEXT:    addi sp, sp, -512903; RV64I-NEXT:    addi sp, sp, 512904; RV64I-NEXT:    ret905;906; RV32ZICBOP-LABEL: test_prefetch_frameindex_5:907; RV32ZICBOP:       # %bb.0:908; RV32ZICBOP-NEXT:    addi sp, sp, -512909; RV32ZICBOP-NEXT:    prefetch.r -32(sp)910; RV32ZICBOP-NEXT:    addi sp, sp, 512911; RV32ZICBOP-NEXT:    ret912;913; RV64ZICBOP-LABEL: test_prefetch_frameindex_5:914; RV64ZICBOP:       # %bb.0:915; RV64ZICBOP-NEXT:    addi sp, sp, -512916; RV64ZICBOP-NEXT:    prefetch.r -32(sp)917; RV64ZICBOP-NEXT:    addi sp, sp, 512918; RV64ZICBOP-NEXT:    ret919;920; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_frameindex_5:921; RV64ZICBOPZIHINTNTL:       # %bb.0:922; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, -512923; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all924; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r -32(sp)925; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, 512926; RV64ZICBOPZIHINTNTL-NEXT:    ret927  %data = alloca [128 x i32], align 4928  %base = bitcast ptr %data to ptr929  %ptr = getelementptr [128 x i32], ptr %base, i32 0, i32 -8930  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)931  ret void932}933 934define void @test_prefetch_frameindex_6() nounwind {935; RV32I-LABEL: test_prefetch_frameindex_6:936; RV32I:       # %bb.0:937; RV32I-NEXT:    addi sp, sp, -512938; RV32I-NEXT:    addi sp, sp, 512939; RV32I-NEXT:    ret940;941; RV64I-LABEL: test_prefetch_frameindex_6:942; RV64I:       # %bb.0:943; RV64I-NEXT:    addi sp, sp, -512944; RV64I-NEXT:    addi sp, sp, 512945; RV64I-NEXT:    ret946;947; RV32ZICBOP-LABEL: test_prefetch_frameindex_6:948; RV32ZICBOP:       # %bb.0:949; RV32ZICBOP-NEXT:    addi sp, sp, -512950; RV32ZICBOP-NEXT:    prefetch.r 2016(sp)951; RV32ZICBOP-NEXT:    addi sp, sp, 512952; RV32ZICBOP-NEXT:    ret953;954; RV64ZICBOP-LABEL: test_prefetch_frameindex_6:955; RV64ZICBOP:       # %bb.0:956; RV64ZICBOP-NEXT:    addi sp, sp, -512957; RV64ZICBOP-NEXT:    prefetch.r 2016(sp)958; RV64ZICBOP-NEXT:    addi sp, sp, 512959; RV64ZICBOP-NEXT:    ret960;961; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_frameindex_6:962; RV64ZICBOPZIHINTNTL:       # %bb.0:963; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, -512964; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all965; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 2016(sp)966; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, 512967; RV64ZICBOPZIHINTNTL-NEXT:    ret968  %data = alloca [128 x i32], align 4969  %base = bitcast ptr %data to ptr970  %ptr = getelementptr [128 x i32], ptr %base, i32 0, i32 504971  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)972  ret void973}974 975define void @test_prefetch_frameindex_7() nounwind {976; RV32I-LABEL: test_prefetch_frameindex_7:977; RV32I:       # %bb.0:978; RV32I-NEXT:    addi sp, sp, -512979; RV32I-NEXT:    addi sp, sp, 512980; RV32I-NEXT:    ret981;982; RV64I-LABEL: test_prefetch_frameindex_7:983; RV64I:       # %bb.0:984; RV64I-NEXT:    addi sp, sp, -512985; RV64I-NEXT:    addi sp, sp, 512986; RV64I-NEXT:    ret987;988; RV32ZICBOP-LABEL: test_prefetch_frameindex_7:989; RV32ZICBOP:       # %bb.0:990; RV32ZICBOP-NEXT:    addi sp, sp, -512991; RV32ZICBOP-NEXT:    prefetch.r -2048(sp)992; RV32ZICBOP-NEXT:    addi sp, sp, 512993; RV32ZICBOP-NEXT:    ret994;995; RV64ZICBOP-LABEL: test_prefetch_frameindex_7:996; RV64ZICBOP:       # %bb.0:997; RV64ZICBOP-NEXT:    addi sp, sp, -512998; RV64ZICBOP-NEXT:    prefetch.r -2048(sp)999; RV64ZICBOP-NEXT:    addi sp, sp, 5121000; RV64ZICBOP-NEXT:    ret1001;1002; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_frameindex_7:1003; RV64ZICBOPZIHINTNTL:       # %bb.0:1004; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, -5121005; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1006; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r -2048(sp)1007; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, 5121008; RV64ZICBOPZIHINTNTL-NEXT:    ret1009  %data = alloca [128 x i32], align 41010  %base = bitcast ptr %data to ptr1011  %ptr = getelementptr [128 x i32], ptr %base, i32 0, i32 -5121012  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1013  ret void1014}1015 1016define void @test_prefetch_frameindex_8() nounwind {1017; RV32I-LABEL: test_prefetch_frameindex_8:1018; RV32I:       # %bb.0:1019; RV32I-NEXT:    addi sp, sp, -5121020; RV32I-NEXT:    addi sp, sp, 5121021; RV32I-NEXT:    ret1022;1023; RV64I-LABEL: test_prefetch_frameindex_8:1024; RV64I:       # %bb.0:1025; RV64I-NEXT:    addi sp, sp, -5121026; RV64I-NEXT:    addi sp, sp, 5121027; RV64I-NEXT:    ret1028;1029; RV32ZICBOP-LABEL: test_prefetch_frameindex_8:1030; RV32ZICBOP:       # %bb.0:1031; RV32ZICBOP-NEXT:    addi sp, sp, -5121032; RV32ZICBOP-NEXT:    addi a0, sp, 20201033; RV32ZICBOP-NEXT:    prefetch.r 0(a0)1034; RV32ZICBOP-NEXT:    addi sp, sp, 5121035; RV32ZICBOP-NEXT:    ret1036;1037; RV64ZICBOP-LABEL: test_prefetch_frameindex_8:1038; RV64ZICBOP:       # %bb.0:1039; RV64ZICBOP-NEXT:    addi sp, sp, -5121040; RV64ZICBOP-NEXT:    addi a0, sp, 20201041; RV64ZICBOP-NEXT:    prefetch.r 0(a0)1042; RV64ZICBOP-NEXT:    addi sp, sp, 5121043; RV64ZICBOP-NEXT:    ret1044;1045; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_frameindex_8:1046; RV64ZICBOPZIHINTNTL:       # %bb.0:1047; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, -5121048; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, sp, 20201049; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1050; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)1051; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, 5121052; RV64ZICBOPZIHINTNTL-NEXT:    ret1053  %data = alloca [128 x i32], align 41054  %base = bitcast ptr %data to ptr1055  %ptr = getelementptr [128 x i32], ptr %base, i32 0, i32 5051056  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1057  ret void1058}1059 1060define void @test_prefetch_frameindex_9() nounwind {1061; RV32I-LABEL: test_prefetch_frameindex_9:1062; RV32I:       # %bb.0:1063; RV32I-NEXT:    addi sp, sp, -5121064; RV32I-NEXT:    addi sp, sp, 5121065; RV32I-NEXT:    ret1066;1067; RV64I-LABEL: test_prefetch_frameindex_9:1068; RV64I:       # %bb.0:1069; RV64I-NEXT:    addi sp, sp, -5121070; RV64I-NEXT:    addi sp, sp, 5121071; RV64I-NEXT:    ret1072;1073; RV32ZICBOP-LABEL: test_prefetch_frameindex_9:1074; RV32ZICBOP:       # %bb.0:1075; RV32ZICBOP-NEXT:    addi sp, sp, -5121076; RV32ZICBOP-NEXT:    mv a0, sp1077; RV32ZICBOP-NEXT:    addi a0, a0, -41078; RV32ZICBOP-NEXT:    prefetch.r -2048(a0)1079; RV32ZICBOP-NEXT:    addi sp, sp, 5121080; RV32ZICBOP-NEXT:    ret1081;1082; RV64ZICBOP-LABEL: test_prefetch_frameindex_9:1083; RV64ZICBOP:       # %bb.0:1084; RV64ZICBOP-NEXT:    addi sp, sp, -5121085; RV64ZICBOP-NEXT:    mv a0, sp1086; RV64ZICBOP-NEXT:    addi a0, a0, -41087; RV64ZICBOP-NEXT:    prefetch.r -2048(a0)1088; RV64ZICBOP-NEXT:    addi sp, sp, 5121089; RV64ZICBOP-NEXT:    ret1090;1091; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_frameindex_9:1092; RV64ZICBOPZIHINTNTL:       # %bb.0:1093; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, -5121094; RV64ZICBOPZIHINTNTL-NEXT:    mv a0, sp1095; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, -41096; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1097; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r -2048(a0)1098; RV64ZICBOPZIHINTNTL-NEXT:    addi sp, sp, 5121099; RV64ZICBOPZIHINTNTL-NEXT:    ret1100  %data = alloca [128 x i32], align 41101  %base = bitcast ptr %data to ptr1102  %ptr = getelementptr [128 x i32], ptr %base, i32 0, i32 -5131103  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1104  ret void1105}1106 1107define void @test_prefetch_constant_address_0() nounwind {1108; RV32I-LABEL: test_prefetch_constant_address_0:1109; RV32I:       # %bb.0:1110; RV32I-NEXT:    ret1111;1112; RV64I-LABEL: test_prefetch_constant_address_0:1113; RV64I:       # %bb.0:1114; RV64I-NEXT:    ret1115;1116; RV32ZICBOP-LABEL: test_prefetch_constant_address_0:1117; RV32ZICBOP:       # %bb.0:1118; RV32ZICBOP-NEXT:    lui a0, 11119; RV32ZICBOP-NEXT:    prefetch.r 32(a0)1120; RV32ZICBOP-NEXT:    ret1121;1122; RV64ZICBOP-LABEL: test_prefetch_constant_address_0:1123; RV64ZICBOP:       # %bb.0:1124; RV64ZICBOP-NEXT:    lui a0, 11125; RV64ZICBOP-NEXT:    prefetch.r 32(a0)1126; RV64ZICBOP-NEXT:    ret1127;1128; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_constant_address_0:1129; RV64ZICBOPZIHINTNTL:       # %bb.0:1130; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, 11131; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1132; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 32(a0)1133; RV64ZICBOPZIHINTNTL-NEXT:    ret1134  %ptr = inttoptr i64 4128 to ptr1135  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1136  ret void1137}1138 1139define void @test_prefetch_constant_address_1() nounwind {1140; RV32I-LABEL: test_prefetch_constant_address_1:1141; RV32I:       # %bb.0:1142; RV32I-NEXT:    ret1143;1144; RV64I-LABEL: test_prefetch_constant_address_1:1145; RV64I:       # %bb.0:1146; RV64I-NEXT:    ret1147;1148; RV32ZICBOP-LABEL: test_prefetch_constant_address_1:1149; RV32ZICBOP:       # %bb.0:1150; RV32ZICBOP-NEXT:    lui a0, 11151; RV32ZICBOP-NEXT:    addi a0, a0, 311152; RV32ZICBOP-NEXT:    prefetch.r 0(a0)1153; RV32ZICBOP-NEXT:    ret1154;1155; RV64ZICBOP-LABEL: test_prefetch_constant_address_1:1156; RV64ZICBOP:       # %bb.0:1157; RV64ZICBOP-NEXT:    lui a0, 11158; RV64ZICBOP-NEXT:    addi a0, a0, 311159; RV64ZICBOP-NEXT:    prefetch.r 0(a0)1160; RV64ZICBOP-NEXT:    ret1161;1162; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_constant_address_1:1163; RV64ZICBOPZIHINTNTL:       # %bb.0:1164; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, 11165; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, 311166; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1167; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)1168; RV64ZICBOPZIHINTNTL-NEXT:    ret1169  %ptr = inttoptr i64 4127 to ptr1170  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1171  ret void1172}1173 1174define void @test_prefetch_constant_address_2() nounwind {1175; RV32I-LABEL: test_prefetch_constant_address_2:1176; RV32I:       # %bb.0:1177; RV32I-NEXT:    ret1178;1179; RV64I-LABEL: test_prefetch_constant_address_2:1180; RV64I:       # %bb.0:1181; RV64I-NEXT:    ret1182;1183; RV32ZICBOP-LABEL: test_prefetch_constant_address_2:1184; RV32ZICBOP:       # %bb.0:1185; RV32ZICBOP-NEXT:    lui a0, 10485611186; RV32ZICBOP-NEXT:    prefetch.r 32(a0)1187; RV32ZICBOP-NEXT:    ret1188;1189; RV64ZICBOP-LABEL: test_prefetch_constant_address_2:1190; RV64ZICBOP:       # %bb.0:1191; RV64ZICBOP-NEXT:    lui a0, 10485611192; RV64ZICBOP-NEXT:    prefetch.r 32(a0)1193; RV64ZICBOP-NEXT:    ret1194;1195; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_constant_address_2:1196; RV64ZICBOPZIHINTNTL:       # %bb.0:1197; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, 10485611198; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1199; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 32(a0)1200; RV64ZICBOPZIHINTNTL-NEXT:    ret1201  %ptr = inttoptr i64 18446744073709490208 to ptr1202  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1203  ret void1204}1205 1206define void @test_prefetch_constant_address_3() nounwind {1207; RV32I-LABEL: test_prefetch_constant_address_3:1208; RV32I:       # %bb.0:1209; RV32I-NEXT:    ret1210;1211; RV64I-LABEL: test_prefetch_constant_address_3:1212; RV64I:       # %bb.0:1213; RV64I-NEXT:    ret1214;1215; RV32ZICBOP-LABEL: test_prefetch_constant_address_3:1216; RV32ZICBOP:       # %bb.0:1217; RV32ZICBOP-NEXT:    lui a0, 10485611218; RV32ZICBOP-NEXT:    addi a0, a0, 311219; RV32ZICBOP-NEXT:    prefetch.r 0(a0)1220; RV32ZICBOP-NEXT:    ret1221;1222; RV64ZICBOP-LABEL: test_prefetch_constant_address_3:1223; RV64ZICBOP:       # %bb.0:1224; RV64ZICBOP-NEXT:    lui a0, 10485611225; RV64ZICBOP-NEXT:    addi a0, a0, 311226; RV64ZICBOP-NEXT:    prefetch.r 0(a0)1227; RV64ZICBOP-NEXT:    ret1228;1229; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_constant_address_3:1230; RV64ZICBOPZIHINTNTL:       # %bb.0:1231; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, 10485611232; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, 311233; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1234; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)1235; RV64ZICBOPZIHINTNTL-NEXT:    ret1236  %ptr = inttoptr i64 18446744073709490207 to ptr1237  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1238  ret void1239}1240 1241@g = external global [1024 x i32], align 41242 1243define void @test_prefetch_global_0() nounwind {1244; RV32I-LABEL: test_prefetch_global_0:1245; RV32I:       # %bb.0:1246; RV32I-NEXT:    ret1247;1248; RV64I-LABEL: test_prefetch_global_0:1249; RV64I:       # %bb.0:1250; RV64I-NEXT:    ret1251;1252; RV32ZICBOP-LABEL: test_prefetch_global_0:1253; RV32ZICBOP:       # %bb.0:1254; RV32ZICBOP-NEXT:    lui a0, %hi(g)1255; RV32ZICBOP-NEXT:    addi a0, a0, %lo(g)1256; RV32ZICBOP-NEXT:    prefetch.r 0(a0)1257; RV32ZICBOP-NEXT:    ret1258;1259; RV64ZICBOP-LABEL: test_prefetch_global_0:1260; RV64ZICBOP:       # %bb.0:1261; RV64ZICBOP-NEXT:    lui a0, %hi(g)1262; RV64ZICBOP-NEXT:    addi a0, a0, %lo(g)1263; RV64ZICBOP-NEXT:    prefetch.r 0(a0)1264; RV64ZICBOP-NEXT:    ret1265;1266; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_global_0:1267; RV64ZICBOPZIHINTNTL:       # %bb.0:1268; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, %hi(g)1269; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, %lo(g)1270; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1271; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)1272; RV64ZICBOPZIHINTNTL-NEXT:    ret1273  %ptr = getelementptr [1024 x i32], ptr @g, i32 0, i32 01274  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1275  ret void1276}1277 1278define void @test_prefetch_global_1() nounwind {1279; RV32I-LABEL: test_prefetch_global_1:1280; RV32I:       # %bb.0:1281; RV32I-NEXT:    ret1282;1283; RV64I-LABEL: test_prefetch_global_1:1284; RV64I:       # %bb.0:1285; RV64I-NEXT:    ret1286;1287; RV32ZICBOP-LABEL: test_prefetch_global_1:1288; RV32ZICBOP:       # %bb.0:1289; RV32ZICBOP-NEXT:    lui a0, %hi(g+16)1290; RV32ZICBOP-NEXT:    addi a0, a0, %lo(g+16)1291; RV32ZICBOP-NEXT:    prefetch.r 0(a0)1292; RV32ZICBOP-NEXT:    ret1293;1294; RV64ZICBOP-LABEL: test_prefetch_global_1:1295; RV64ZICBOP:       # %bb.0:1296; RV64ZICBOP-NEXT:    lui a0, %hi(g+16)1297; RV64ZICBOP-NEXT:    addi a0, a0, %lo(g+16)1298; RV64ZICBOP-NEXT:    prefetch.r 0(a0)1299; RV64ZICBOP-NEXT:    ret1300;1301; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_global_1:1302; RV64ZICBOPZIHINTNTL:       # %bb.0:1303; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, %hi(g+16)1304; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, %lo(g+16)1305; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1306; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)1307; RV64ZICBOPZIHINTNTL-NEXT:    ret1308  %ptr = getelementptr [1024 x i32], ptr @g, i32 0, i32 41309  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1310  ret void1311}1312 1313define void @test_prefetch_global_2() nounwind {1314; RV32I-LABEL: test_prefetch_global_2:1315; RV32I:       # %bb.0:1316; RV32I-NEXT:    ret1317;1318; RV64I-LABEL: test_prefetch_global_2:1319; RV64I:       # %bb.0:1320; RV64I-NEXT:    ret1321;1322; RV32ZICBOP-LABEL: test_prefetch_global_2:1323; RV32ZICBOP:       # %bb.0:1324; RV32ZICBOP-NEXT:    lui a0, %hi(g-16)1325; RV32ZICBOP-NEXT:    addi a0, a0, %lo(g-16)1326; RV32ZICBOP-NEXT:    prefetch.r 0(a0)1327; RV32ZICBOP-NEXT:    ret1328;1329; RV64ZICBOP-LABEL: test_prefetch_global_2:1330; RV64ZICBOP:       # %bb.0:1331; RV64ZICBOP-NEXT:    lui a0, %hi(g-16)1332; RV64ZICBOP-NEXT:    addi a0, a0, %lo(g-16)1333; RV64ZICBOP-NEXT:    prefetch.r 0(a0)1334; RV64ZICBOP-NEXT:    ret1335;1336; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_global_2:1337; RV64ZICBOPZIHINTNTL:       # %bb.0:1338; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, %hi(g-16)1339; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, %lo(g-16)1340; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1341; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)1342; RV64ZICBOPZIHINTNTL-NEXT:    ret1343  %ptr = getelementptr [1024 x i32], ptr @g, i32 0, i32 -41344  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1345  ret void1346}1347 1348define void @test_prefetch_global_3() nounwind {1349; RV32I-LABEL: test_prefetch_global_3:1350; RV32I:       # %bb.0:1351; RV32I-NEXT:    ret1352;1353; RV64I-LABEL: test_prefetch_global_3:1354; RV64I:       # %bb.0:1355; RV64I-NEXT:    ret1356;1357; RV32ZICBOP-LABEL: test_prefetch_global_3:1358; RV32ZICBOP:       # %bb.0:1359; RV32ZICBOP-NEXT:    lui a0, %hi(g)1360; RV32ZICBOP-NEXT:    addi a0, a0, %lo(g)1361; RV32ZICBOP-NEXT:    prefetch.r 32(a0)1362; RV32ZICBOP-NEXT:    ret1363;1364; RV64ZICBOP-LABEL: test_prefetch_global_3:1365; RV64ZICBOP:       # %bb.0:1366; RV64ZICBOP-NEXT:    lui a0, %hi(g)1367; RV64ZICBOP-NEXT:    addi a0, a0, %lo(g)1368; RV64ZICBOP-NEXT:    prefetch.r 32(a0)1369; RV64ZICBOP-NEXT:    ret1370;1371; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_global_3:1372; RV64ZICBOPZIHINTNTL:       # %bb.0:1373; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, %hi(g)1374; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, %lo(g)1375; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1376; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 32(a0)1377; RV64ZICBOPZIHINTNTL-NEXT:    ret1378  %ptr = getelementptr [1024 x i32], ptr @g, i32 0, i32 81379  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1380  ret void1381}1382 1383define void @test_prefetch_global_4() nounwind {1384; RV32I-LABEL: test_prefetch_global_4:1385; RV32I:       # %bb.0:1386; RV32I-NEXT:    ret1387;1388; RV64I-LABEL: test_prefetch_global_4:1389; RV64I:       # %bb.0:1390; RV64I-NEXT:    ret1391;1392; RV32ZICBOP-LABEL: test_prefetch_global_4:1393; RV32ZICBOP:       # %bb.0:1394; RV32ZICBOP-NEXT:    lui a0, %hi(g)1395; RV32ZICBOP-NEXT:    addi a0, a0, %lo(g)1396; RV32ZICBOP-NEXT:    prefetch.r -32(a0)1397; RV32ZICBOP-NEXT:    ret1398;1399; RV64ZICBOP-LABEL: test_prefetch_global_4:1400; RV64ZICBOP:       # %bb.0:1401; RV64ZICBOP-NEXT:    lui a0, %hi(g)1402; RV64ZICBOP-NEXT:    addi a0, a0, %lo(g)1403; RV64ZICBOP-NEXT:    prefetch.r -32(a0)1404; RV64ZICBOP-NEXT:    ret1405;1406; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_global_4:1407; RV64ZICBOPZIHINTNTL:       # %bb.0:1408; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, %hi(g)1409; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, %lo(g)1410; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1411; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r -32(a0)1412; RV64ZICBOPZIHINTNTL-NEXT:    ret1413  %ptr = getelementptr [1024 x i32], ptr @g, i32 0, i32 -81414  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1415  ret void1416}1417 1418define void @test_prefetch_global_5() nounwind {1419; RV32I-LABEL: test_prefetch_global_5:1420; RV32I:       # %bb.0:1421; RV32I-NEXT:    ret1422;1423; RV64I-LABEL: test_prefetch_global_5:1424; RV64I:       # %bb.0:1425; RV64I-NEXT:    ret1426;1427; RV32ZICBOP-LABEL: test_prefetch_global_5:1428; RV32ZICBOP:       # %bb.0:1429; RV32ZICBOP-NEXT:    lui a0, %hi(g)1430; RV32ZICBOP-NEXT:    addi a0, a0, %lo(g)1431; RV32ZICBOP-NEXT:    prefetch.r 2016(a0)1432; RV32ZICBOP-NEXT:    ret1433;1434; RV64ZICBOP-LABEL: test_prefetch_global_5:1435; RV64ZICBOP:       # %bb.0:1436; RV64ZICBOP-NEXT:    lui a0, %hi(g)1437; RV64ZICBOP-NEXT:    addi a0, a0, %lo(g)1438; RV64ZICBOP-NEXT:    prefetch.r 2016(a0)1439; RV64ZICBOP-NEXT:    ret1440;1441; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_global_5:1442; RV64ZICBOPZIHINTNTL:       # %bb.0:1443; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, %hi(g)1444; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, %lo(g)1445; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1446; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 2016(a0)1447; RV64ZICBOPZIHINTNTL-NEXT:    ret1448  %ptr = getelementptr [1024 x i32], ptr @g, i32 0, i32 5041449  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1450  ret void1451}1452 1453define void @test_prefetch_global_6() nounwind {1454; RV32I-LABEL: test_prefetch_global_6:1455; RV32I:       # %bb.0:1456; RV32I-NEXT:    ret1457;1458; RV64I-LABEL: test_prefetch_global_6:1459; RV64I:       # %bb.0:1460; RV64I-NEXT:    ret1461;1462; RV32ZICBOP-LABEL: test_prefetch_global_6:1463; RV32ZICBOP:       # %bb.0:1464; RV32ZICBOP-NEXT:    lui a0, %hi(g)1465; RV32ZICBOP-NEXT:    addi a0, a0, %lo(g)1466; RV32ZICBOP-NEXT:    prefetch.r -2048(a0)1467; RV32ZICBOP-NEXT:    ret1468;1469; RV64ZICBOP-LABEL: test_prefetch_global_6:1470; RV64ZICBOP:       # %bb.0:1471; RV64ZICBOP-NEXT:    lui a0, %hi(g)1472; RV64ZICBOP-NEXT:    addi a0, a0, %lo(g)1473; RV64ZICBOP-NEXT:    prefetch.r -2048(a0)1474; RV64ZICBOP-NEXT:    ret1475;1476; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_global_6:1477; RV64ZICBOPZIHINTNTL:       # %bb.0:1478; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, %hi(g)1479; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, %lo(g)1480; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1481; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r -2048(a0)1482; RV64ZICBOPZIHINTNTL-NEXT:    ret1483  %ptr = getelementptr [1024 x i32], ptr @g, i32 0, i32 -5121484  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1485  ret void1486}1487 1488define void @test_prefetch_global_7() nounwind {1489; RV32I-LABEL: test_prefetch_global_7:1490; RV32I:       # %bb.0:1491; RV32I-NEXT:    ret1492;1493; RV64I-LABEL: test_prefetch_global_7:1494; RV64I:       # %bb.0:1495; RV64I-NEXT:    ret1496;1497; RV32ZICBOP-LABEL: test_prefetch_global_7:1498; RV32ZICBOP:       # %bb.0:1499; RV32ZICBOP-NEXT:    lui a0, %hi(g+2020)1500; RV32ZICBOP-NEXT:    addi a0, a0, %lo(g+2020)1501; RV32ZICBOP-NEXT:    prefetch.r 0(a0)1502; RV32ZICBOP-NEXT:    ret1503;1504; RV64ZICBOP-LABEL: test_prefetch_global_7:1505; RV64ZICBOP:       # %bb.0:1506; RV64ZICBOP-NEXT:    lui a0, %hi(g+2020)1507; RV64ZICBOP-NEXT:    addi a0, a0, %lo(g+2020)1508; RV64ZICBOP-NEXT:    prefetch.r 0(a0)1509; RV64ZICBOP-NEXT:    ret1510;1511; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_global_7:1512; RV64ZICBOPZIHINTNTL:       # %bb.0:1513; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, %hi(g+2020)1514; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, %lo(g+2020)1515; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1516; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r 0(a0)1517; RV64ZICBOPZIHINTNTL-NEXT:    ret1518  %ptr = getelementptr [1024 x i32], ptr @g, i32 0, i32 5051519  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1520  ret void1521}1522 1523define void @test_prefetch_global_8() nounwind {1524; RV32I-LABEL: test_prefetch_global_8:1525; RV32I:       # %bb.0:1526; RV32I-NEXT:    ret1527;1528; RV64I-LABEL: test_prefetch_global_8:1529; RV64I:       # %bb.0:1530; RV64I-NEXT:    ret1531;1532; RV32ZICBOP-LABEL: test_prefetch_global_8:1533; RV32ZICBOP:       # %bb.0:1534; RV32ZICBOP-NEXT:    lui a0, %hi(g-4)1535; RV32ZICBOP-NEXT:    addi a0, a0, %lo(g-4)1536; RV32ZICBOP-NEXT:    prefetch.r -2048(a0)1537; RV32ZICBOP-NEXT:    ret1538;1539; RV64ZICBOP-LABEL: test_prefetch_global_8:1540; RV64ZICBOP:       # %bb.0:1541; RV64ZICBOP-NEXT:    lui a0, %hi(g-4)1542; RV64ZICBOP-NEXT:    addi a0, a0, %lo(g-4)1543; RV64ZICBOP-NEXT:    prefetch.r -2048(a0)1544; RV64ZICBOP-NEXT:    ret1545;1546; RV64ZICBOPZIHINTNTL-LABEL: test_prefetch_global_8:1547; RV64ZICBOPZIHINTNTL:       # %bb.0:1548; RV64ZICBOPZIHINTNTL-NEXT:    lui a0, %hi(g-4)1549; RV64ZICBOPZIHINTNTL-NEXT:    addi a0, a0, %lo(g-4)1550; RV64ZICBOPZIHINTNTL-NEXT:    ntl.all1551; RV64ZICBOPZIHINTNTL-NEXT:    prefetch.r -2048(a0)1552; RV64ZICBOPZIHINTNTL-NEXT:    ret1553  %ptr = getelementptr [1024 x i32], ptr @g, i32 0, i32 -5131554  call void @llvm.prefetch(ptr %ptr, i32 0, i32 0, i32 1)1555  ret void1556}1557