[PATCH] D140647: Handle simple diamond CFG hoisting in DivRemPairs.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 24 12:26:28 PST 2022


lebedev.ri added inline comments.


================
Comment at: llvm/test/Transforms/DivRemPairs/X86/div-expanded-rem-pair.ll:181
 ; CHECK:       if.then:
-; CHECK-NEXT:    [[T0:%.*]] = udiv i32 [[A:%.*]], [[B:%.*]]
+; CHECK-NEXT:    [[T0:%.*]] = udiv i32 [[A]], [[B]]
 ; CHECK-NEXT:    [[T1:%.*]] = mul nuw i32 [[T0]], [[B]]
----------------
craig.topper wrote:
> Isn't this the same as T3? Doesn't entry dominate this block?
We only deal with a single div-rem pair (in the sense,
we don't deal with the case of multiple identical div's or rem's),
and we don't CSE div's/rem's, and only do a single pass over the function,
 so this indeed falls through cracks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140647



More information about the llvm-commits mailing list