blob: 7ea689ef99f4af38c534641232abb0e446f2ba3d [file] [log] [blame]
Simon Atanasyanee5af502019-07-12 04:58:45 +00001; RUN: llc -mtriple=mips-mti-linux-gnu -mcpu=mips32r2 -mattr=+micromips \
2; RUN: -stop-after=finalize-isel < %s | FileCheck --check-prefix=MM2 %s
3; RUN: llc -mtriple=mips-mti-linux-gnu -mcpu=mips32r6 -mattr=+micromips \
4; RUN: -stop-after=finalize-isel < %s | FileCheck --check-prefix=MM6 %s
Aleksandar Beserminjib9c840c2018-11-01 13:57:54 +00005
Simon Atanasyanee5af502019-07-12 04:58:45 +00006; MM2: JAL_MM @bar
7; MM2: JAL_MM &memset
8; MM2-NOT: JALR16_MM
9
10; MM6: JAL_MMR6 @bar
11; MM6: JAL_MMR6 &memset
12; MM6-NOT: JALRC16_MMR6
Aleksandar Beserminjib9c840c2018-11-01 13:57:54 +000013
14define dso_local void @foo(i32* nocapture %ar) local_unnamed_addr {
15entry:
Simon Atanasyanee5af502019-07-12 04:58:45 +000016 call void @bar()
Aleksandar Beserminjib9c840c2018-11-01 13:57:54 +000017 %0 = bitcast i32* %ar to i8*
18 tail call void @llvm.memset.p0i8.i32(i8* align 4 %0, i8 0, i32 100, i1 false)
19 ret void
20}
21
22declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i1)
Simon Atanasyanee5af502019-07-12 04:58:45 +000023declare void @bar()