[llvm] [SandboxIR] Implement the InsertElementInst class (PR #102404)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 9 09:59:05 PDT 2024
================
@@ -630,6 +630,44 @@ define void @foo(i1 %c0, i8 %v0, i8 %v1, i1 %c1) {
}
}
+TEST_F(SandboxIRTest, InsertElementInst) {
+ parseIR(C, R"IR(
+define void @foo(i8 %v0, i8 %v1) {
+ %ins0 = insertelement <2 x i8> poison, i8 %v0, i32 0
+ %ins1 = insertelement <2 x i8> %ins0, i8 %v1, i32 1
+ ret void
+}
+)IR");
+ Function &F = *M->getFunction("foo");
+ sandboxir::Context Ctx(C);
+ auto &SBF = *Ctx.createFunction(&F);
----------------
vporpo wrote:
And the sandboxir stuff is usually without the `SB` prefix. So this should be `auto &F = `
https://github.com/llvm/llvm-project/pull/102404
More information about the llvm-commits
mailing list