[PATCH] D84405: CodeGen: Improve generated IR for __builtin_mul_overflow(uint, uint, int)

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 23 10:26:28 PDT 2020


vsk added a comment.

How were you able to show that the specialized IRGen is equivalent to the generic kind? I tried doing this with direct inspection (https://godbolt.org/z/o5WEn3), but wasn't able to convince myself. In the past I used a test driver to compare the before/after compiler output -- you might find that useful (https://gist.github.com/vedantk/3eb9c88f82e5c32f2e590555b4af5081).



================
Comment at: clang/test/CodeGen/builtins-overflow.c:123
+  // CHECK: br i1 [[C2]]
+  int r;
+  if (__builtin_mul_overflow(x, y, &r))
----------------
Could you add a test for the volatile result case?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84405





More information about the cfe-commits mailing list