[PATCH] D98600: [X86][FastISel] Fix with.overflow eflags clobber (PR49587)

Simonas Kazlauskas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 05:52:55 PDT 2021


nagisa added a comment.

Yeah that looks like the one.

Alright, in that case, then, there are a couple other alternative approaches that I think would likely address this class of problems in a more general way:

First, changing the emission of constant->register moves to always produce a `mov`, thus no longer clobbering the flags ever. This way adding arbitrary constant production all over the place wouldn't have potentially far reaching consequences.

Alternatively, mayhaps it is possible to check that we haven't inserted any //machine// instructions between the code generated for the intrinsic and the branch? That would make the "Make sure nothing is in the way" check significantly more direct, I feel.

(But also, feel free to ignore me, I'm not nowhere near familiar enough with FastISel to be able to say what it ought to look like)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98600



More information about the llvm-commits mailing list