[PATCH] D142426: [ValueTracking] Add tests for KnownBits of (and/xor/or X, (add/sub X, OddV)); NFC
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 20 11:58:47 PST 2023
nikic added inline comments.
================
Comment at: llvm/test/Analysis/ValueTracking/knownbits-and-or-xor-lowbit.ll:15
+ %b = and i32 %z, 1
+ ret i32 %b
+}
----------------
Ideally, input IR and output IR for test cases are the same (before the patch) to the degree that this is possible. Otherwise it gives the impression that a test covers a codepath it doesn't actually use -- for example, the test is written as if this checks the `sub X, Odd` case, but it really is a convoluted way to write an `add X, Odd` test.
(It looks like a lot of tests here end up testing `add X, 1` in the end -- was that intentional?)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142426/new/
https://reviews.llvm.org/D142426
More information about the llvm-commits
mailing list