[llvm] [SandboxIR] Added setVolatile member function to LoadInst and StoreInst (PR #101284)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 08:50:37 PDT 2024


https://github.com/vporpo commented:

We also need to test the `SetVolatile` tracker object with a test in `llvm/unittests/SandboxIR/TrackerTest.cpp`. See how it's done in the existing tests.

You start tracking with `Ctx.save()`, then you will set the volatile value `Store->setVolatile(true)` then you will check that it was actually set `EXPECT_TRUE(Store->isVolatile())`, then you will revert the state of the IR with `Ctx.revert()` and check that the volatile flag was back to its original value `EXPECT_FALSE(Store->isVolatile())`.

Same for the Load (in the same test).

https://github.com/llvm/llvm-project/pull/101284


More information about the llvm-commits mailing list