[PATCH] D85392: [WebAssembly][ConstantFolding] Fold fp-to-int truncation intrinsics
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 13:20:01 PDT 2020
tlively added a comment.
Yes, most of the SIMD intrinsics could be folded as well. It’s certainly on my todo list.
================
Comment at: llvm/test/Analysis/ConstantFolding/WebAssembly/trunc.ll:160
+ store volatile i32 %t14, i32* %p
+ %t15 = call i32 @llvm.wasm.trunc.unsigned.i32.f32(float 0x7ff0000000000000); inf
+ store volatile i32 %t15, i32* %p
----------------
aheejin wrote:
> It'd probably be easier to read if there is a comment dividing the instructions that are supposed to be folded and ones that are not, such as
> ```
> ; Instructions below this line are not supposed to folded because they are nan or overflow/underflow
> ```
> or something. The same for other functions
Good idea! I will add these comments in a follow up.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85392/new/
https://reviews.llvm.org/D85392
More information about the llvm-commits
mailing list