[PATCH] D81685: BypassSlowDivision: Fix dropping debug info

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 19:15:52 PDT 2020


vsk added a comment.

Re: "This constructs a new IRBuilder and reconstructs the original divides rather than moving the original", you're not changing the algorithm here, just the way locations are assigned, right? Not sure I understand what's meant by 'reconstructs the original divides'.



================
Comment at: llvm/lib/Transforms/Utils/BypassSlowDivision.cpp:441
     QuotRemPair Result = createDivRemPhiNodes(Fast, Slow, SuccessorBB);
     Value *CmpV = insertOperandRuntimeCheck(DividendShort ? nullptr : Dividend,
                                             DivisorShort ? nullptr : Divisor);
----------------
Is it simpler to just pass in the builder (which has the location set already)?


================
Comment at: llvm/test/Transforms/CodeGenPrepare/AMDGPU/bypass-slow-div-debug-info.ll:29
+; FIXME: The debugloc for the rem parts end up with the dbg of the
+; division.
+define <2 x i64> @sdivrem64(i64 %a, i64 %b) {
----------------
I think this is good? At least, it seems better than having the source location of the srem (!10) appear in the fast block.


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

https://reviews.llvm.org/D81685





More information about the llvm-commits mailing list