[PATCH] D55182: InstCombine: Scalarize single use icmp/fcmp

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 10 11:39:42 PST 2018


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

LGTM - but I think there's a bug in cheapToScalarize() that I didn't notice before. Please put a FIXME note in there.



================
Comment at: test/Transforms/InstCombine/scalarization.ll:140-143
-; CHECK-NEXT:    [[CMP:%.*]] = icmp eq <4 x i32> [[X:%.*]], zeroinitializer
-; CHECK-NEXT:    [[TMP1:%.*]] = extractelement <4 x i1> [[CMP]], i32 2
-; CHECK-NEXT:    [[TMP2:%.*]] = extractelement <4 x i1> [[Y:%.*]], i32 2
-; CHECK-NEXT:    [[R:%.*]] = and i1 [[TMP1]], [[TMP2]]
----------------
This doesn't look right to start with. I don't think we can justify leaving more instructions than we started with as a target-independent combine.


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

https://reviews.llvm.org/D55182





More information about the llvm-commits mailing list