[PATCH] D48338: [SCEV] Improve zext(A /u B) and zext(A % B)

Alexandre Isoard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 19 22:53:13 PDT 2018


alexandre.isoard added a comment.

Ah, you are right, I misinterpreted the purpose.

On that note, why do we want to sink the `zext`? Wouldn't it be detrimental as it will generate operators of bigger complexity once we code-generate the SCEV.
Shouldn't we lift them instead?

That is:

  %x = zext i32 %a to i64
  %y = zext i32 %b to i64
  %div = udiv i64 %x, %y

Expressed as: `zext i32 (%a /u %b) to i64`


https://reviews.llvm.org/D48338





More information about the llvm-commits mailing list