[PATCH] D148180: [InstCombine] Add tests for deducing constants based on condition in select; NFC

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 13 00:30:31 PDT 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/test/Transforms/InstCombine/binop-select.ll:81
+  %c = icmp eq i32 %x, 9
+  %cond = select i1 %c, i32 6, i32 %y
+  %sub = call i32 @llvm.sadd.sat.i32(i32 %x, i32 %cond)
----------------
Maybe add one more (negative) test with the select ops swapped, so we know the constant in the call but not the one in the select.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148180/new/

https://reviews.llvm.org/D148180



More information about the llvm-commits mailing list