[PATCH] D124590: [InstCombine] add casts from splat-a-bit pattern if necessary

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 05:59:58 PDT 2022


spatel added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/sext.ll:397
+
+define i16 @smear_set_bit_different_dest_type_extra_use(i32 %x) {
+; CHECK-LABEL: @smear_set_bit_different_dest_type_extra_use(
----------------
Chenbing.Zheng wrote:
> For this case, we get a correct result, but it is longer. Should I limit trunc one-use to break it?
Yes - we do not want to create more instructions than we started with. That is the purpose for the code comment ("adjust use check)".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124590



More information about the llvm-commits mailing list