aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_test_arit.c
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2016-04-13 05:00:03 +0200
committerJose Fonseca <[email protected]>2016-04-13 11:13:03 +0100
commitcb438d8b3e1e32faf714f22b308c8f9c5506209b (patch)
tree723840d484d44b60d3e9ff9fbd04b91cdf09a2f9 /src/gallium/drivers/llvmpipe/lp_test_arit.c
parentf525db6358fbaa7b4296d2e6484e0b1ae703ac78 (diff)
gallivm: use llvm.nearbyint instead of llvm.round.
We used to use sse roundps intrinsic directly, but switched to use the llvm intrinsics for rounding with e4f01da15d8c6ce3e8c77ff3ff3d2ce2574a3f7b. However, llvm semantics follows standard math lib round function which is specced to do roundNearestAwayFromZero but we really want roundNearestEven (moreoever, using round generates atrocious code since the cpu can't do it directly and it results in scalar calls to libm __roundf). So, use llvm.nearbyint instead, which does exactly the right thing, and even has the advantage of being available with llvm 3.3 too. (I've verified it actually generates a roundps instruction with llvm 3.3.) This fixes https://bugs.freedesktop.org/show_bug.cgi?id=94909 Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_test_arit.c')
0 files changed, 0 insertions, 0 deletions