Constant fold both the trapping and saturating versions of the
WebAssembly truncation intrinsics. The tests are adapted from the
WebAssembly spec tests for the corresponding instructions.
Requested in PR46982.
Paths
| Differential D85392
[WebAssembly][ConstantFolding] Fold fp-to-int truncation intrinsics ClosedPublic Authored by tlively on Aug 5 2020, 8:09 PM.
Details Summary Constant fold both the trapping and saturating versions of the Requested in PR46982.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Aug 10 2020, 12:27 PM This revision was landed with ongoing or failed builds.Aug 10 2020, 12:40 PM Closed by commit rG514445e0353e: [WebAssembly][ConstantFolding] Fold fp-to-int truncation intrinsics (authored by tlively). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions Nice! Just wondering, then are we able to fold most of our SIMD intrinsics here too?
Comment Actions Yes, most of the SIMD intrinsics could be folded as well. It’s certainly on my todo list.
Revision Contents
Diff 284480 llvm/lib/Analysis/ConstantFolding.cpp
llvm/test/Analysis/ConstantFolding/WebAssembly/trunc.ll
llvm/test/Analysis/ConstantFolding/WebAssembly/trunc_saturate.ll
|
stray deletion?