[llvm] [SandboxIR][NFC] Fixes for LoadInst::create functions (PR #100955)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 10:26:25 PDT 2024
================
@@ -750,37 +750,59 @@ define void @foo(ptr %arg0, ptr %arg1) {
auto *BB = &*F->begin();
auto It = BB->begin();
auto *Ld = cast<sandboxir::LoadInst>(&*It++);
- auto *Vld = cast<sandboxir::LoadInst>(&*It++);
+ auto *VLd = cast<sandboxir::LoadInst>(&*It++);
auto *Ret = cast<sandboxir::ReturnInst>(&*It++);
// Check isVolatile()
EXPECT_FALSE(Ld->isVolatile());
// Check isVolatile()
- EXPECT_TRUE(Vld->isVolatile());
+ EXPECT_TRUE(VLd->isVolatile());
// Check getPointerOperand()
EXPECT_EQ(Ld->getPointerOperand(), Arg0);
// Check getAlign()
EXPECT_EQ(Ld->getAlign(), 64);
- // Check create(InsertBefore)
+ // Check create(InsertBefore, IsVolatile=false)
----------------
vporpo wrote:
nit: Well, the `create()` function that we are calling here is the one without the `IsVolatile` argument, so it's probably best to change the comment to something like `// Check create(InsertBefore)` even though internally we do set IsVolatile=false.
https://github.com/llvm/llvm-project/pull/100955
More information about the llvm-commits
mailing list