-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Open
Copy link
Labels
good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributellvm:support
Description
llvm-project/llvm/unittests/Support/KnownBitsTest.cpp
Lines 429 to 460 in 44be5a7
| testBinaryOpExhaustive( | |
| [](const KnownBits &Known1, const KnownBits &Known2) { | |
| return KnownBits::sadd_sat(Known1, Known2); | |
| }, | |
| [](const APInt &N1, const APInt &N2) -> std::optional<APInt> { | |
| return N1.sadd_sat(N2); | |
| }, | |
| checkCorrectnessOnlyBinary); | |
| testBinaryOpExhaustive( | |
| [](const KnownBits &Known1, const KnownBits &Known2) { | |
| return KnownBits::uadd_sat(Known1, Known2); | |
| }, | |
| [](const APInt &N1, const APInt &N2) -> std::optional<APInt> { | |
| return N1.uadd_sat(N2); | |
| }, | |
| checkCorrectnessOnlyBinary); | |
| testBinaryOpExhaustive( | |
| [](const KnownBits &Known1, const KnownBits &Known2) { | |
| return KnownBits::ssub_sat(Known1, Known2); | |
| }, | |
| [](const APInt &N1, const APInt &N2) -> std::optional<APInt> { | |
| return N1.ssub_sat(N2); | |
| }, | |
| checkCorrectnessOnlyBinary); | |
| testBinaryOpExhaustive( | |
| [](const KnownBits &Known1, const KnownBits &Known2) { | |
| return KnownBits::usub_sat(Known1, Known2); | |
| }, | |
| [](const APInt &N1, const APInt &N2) -> std::optional<APInt> { | |
| return N1.usub_sat(N2); | |
| }, | |
| checkCorrectnessOnlyBinary); |
Investigate if we can make the implementation optimal (checkOptimalityBinary)
Metadata
Metadata
Assignees
Labels
good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributellvm:support