[PATCH] D83036: [X86][FPEnv] Lowering of {get,set,reset}_fpmode

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 4 20:10:16 PST 2021


sepavloff added inline comments.


================
Comment at: llvm/test/CodeGen/X86/fpenv32.ll:16
+entry:
+  %v = call i32 @llvm.get.fpmode.i32()
+  ret i32 %v
----------------
craig.topper wrote:
> I'm still not clear who the intended user of these intrinsics are? How would they know when to use i32 and when to use i64?
> who the intended user of these intrinsics are?

These intrinsics can be useful at least in these cases:
* native implementation of `fegetmode`/`fesetmode`,
* internally by compiler when it implements pragmas changing control modes. Such pragma acts only within a compound statement and control modes should be restored upon exit.

> How would they know when to use i32 and when to use i64?

This is a platform-dependent choice, just as the size of pointers.  We could encode them in `DataLayout` (see D71741).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83036



More information about the llvm-commits mailing list