[llvm] [SandboxIR] Add remaining SelectInst methods and track swapValues() (PR #108114)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 18:34:45 PDT 2024
================
@@ -1371,6 +1375,13 @@ define void @foo(i1 %c0, i8 %v0, i8 %v1, i1 %c1) {
// Check setFalseValue().
Select->setFalseValue(V0);
EXPECT_EQ(Select->getFalseValue(), V0);
+ // Check swapValues().
+ Select->swapValues();
+ EXPECT_EQ(Select->getTrueValue(), V0);
+ EXPECT_EQ(Select->getFalseValue(), V1);
+ // Check areInvalidOperands.
+ EXPECT_EQ(sandboxir::SelectInst::areInvalidOperands(Cond, V0, V1), nullptr);
----------------
vporpo wrote:
Hmm shouldn't this be EXPECT_NE ? and the one below EXPECT_EQ ? Btw. I think the bots are failing because `Cond` should be `Cond0`.
https://github.com/llvm/llvm-project/pull/108114
More information about the llvm-commits
mailing list