[ 
https://issues.apache.org/jira/browse/IMPALA-3345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17177327#comment-17177327
 ] 

Tim Armstrong commented on IMPALA-3345:
---------------------------------------

I did try this with newer version of gcc and clang in godbolt and the code 
generated seemed fine for int64_t

> Investigate issues with __builtin_*_overflow in LLVM
> ----------------------------------------------------
>
>                 Key: IMPALA-3345
>                 URL: https://issues.apache.org/jira/browse/IMPALA-3345
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>    Affects Versions: Impala 2.6.0
>            Reporter: Tim Armstrong
>            Priority: Minor
>              Labels: codegen
>
> LLVM 3.8 added support for __builtin_add_overflow and __builtin_mul_overflow. 
> We can use them in decimal-value-inline.h but there are various issues:
> * __builtin_mul_overflow for 128-bit ints (16-byte decimals) generates a 
> reference to a runtime function implemented by LLVM's runtime library but not 
> GCC's (we use the GCC runtime for all code).
> * __builtin_add_overflow seems extremely slow: I saw TPC-H query 1 regress by 
> 3-4x compared to the current code.
> This JIRA is to investigate these issues and see if the functions can be 
> beneficial.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to