[PATCH] D58881: [Transform] Improve fold of sadd.with.overflow

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 00:44:41 PST 2019


lebedev.ri added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/call-add-with-overflow.ll:58
+  %2 = add nsw <2 x i32> %0, <i32 12, i32 undef>
+  %3 = tail call { <2 x i32>, <2 x i1> } @llvm.sadd.with.overflow.v2i32(<2 x i32> %2, <2 x i32> <i32 30, i32 30>)
+  ret { <2 x i32>, <2 x i1> } %3
----------------
nikic wrote:
> dlrobertson wrote:
> > Note: this did not fold.
> Ooops, my bad. I was under the impression that m_APInt ignores undefs, but apparently only matchers for specific constants like m_Zero() do that. Something we might want to improve.
I tried to touch upon that in D47983.
It would require gradual migration.


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

https://reviews.llvm.org/D58881





More information about the llvm-commits mailing list