[llvm-dev] Speculation and control dependent no wrap flags
Friedman, Eli via llvm-dev
llvm-dev at lists.llvm.org
Fri Feb 3 11:18:44 PST 2017
On 2/3/2017 7:50 AM, Reid Kleckner via llvm-dev wrote:
> Just yesterday I talked to Dan Gohman, who suggested we strip nowrap
> flags when speculating. It solves a lot of poison problems.
Yes, stripping nowrap flags when speculating "solves" a lot of poison
problems... in the sense that we could just redefine nsw to mean that
overflow is UB rather than poison. IIRC, this was considered, but
rejected because there are too many optimizations which hoist code (so
we would lose the nsw flags too early in the pipeline). It's possible
we could solve that problem some other way, like recording overflow
assumptions with llvm.assume.
-Eli
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
More information about the llvm-dev
mailing list