llvm-project/clang/lib
Erich Keane 348f22eac8 Correct gcc vector splat conversion from float to int-vector
In looking into some other code, I came across this issue where a
float converted to a gcc integer vector via a splat causes it to miss
the float-to-integral cast, which causes some REALLY strange codegen
bugs.

The AST looked like:
`-ImplicitCastExpr <col:13>
'gcc_int_2':'__attribute__((__vector_size__(2 * sizeof(int)))) int' <VectorSplat>
        `-ImplicitCastExpr <col:13> 'float' <LValueToRValue>
                  `-DeclRefExpr <col:13> 'float' lvalue ParmVar
                  0x556f16a5dc90 'f' 'float'

Despite the type of the VectorSplat cast as printed, it ended up
becoming a vector of float, which caused non-matching instructions. For
example, IntVector + a float constant resulted in:

add <2 x i32> %8, <2 x float> <float 3.000000e+00, float 3.000000e+00>

This patch corrects the conversion so that the float is first converted
to an integral, THEN splatted.
2019-12-13 12:27:31 -08:00
..
ARCMigrate Removed some questionable default arguments from setters 2019-09-12 12:16:43 +00:00
AST [Sema] Improve diagnostic about addr spaces for overload candidates 2019-12-13 12:35:18 +00:00
ASTMatchers Make it possible control matcher traversal kind with ASTContext 2019-12-06 23:11:32 +00:00
Analysis [analyzer] Do not cache out on some shared implicit AST nodes 2019-12-11 17:15:12 -08:00
Basic [Sema] Improve diagnostic about addr spaces for overload candidates 2019-12-13 12:35:18 +00:00
CodeGen Reland [DataLayout] Fix occurrences that size and range of pointers are assumed to be the same. 2019-12-13 14:30:21 +00:00
CrossTU [CrossTU] Fix problem with CrossTU AST load limit and progress messages. 2019-08-12 07:15:29 +00:00
DirectoryWatcher [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Driver Default to -fuse-init-array 2019-12-12 10:32:56 -08:00
Edit [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast 2019-07-02 18:28:13 +00:00
Format Fix warning on extra ';'. NFC. 2019-12-03 16:02:55 -05:00
Frontend Default to -fuse-init-array 2019-12-12 10:32:56 -08:00
FrontendTool [analyzer] Don't run the analyzer for -analyzer-list-enabled-checkers 2019-09-12 18:53:48 +00:00
Headers [ARM][CMSE] Add CMSE header and builtins 2019-12-12 15:01:14 +00:00
Index Remove Expr.h include from ASTContext.h, NFC 2019-12-06 15:30:49 -08:00
Lex [clang-scan-deps] do not skip empty #if/#elif in the minimizer to avoid missing `__has_include` dependencies 2019-12-02 18:47:22 -08:00
Parse [Diagnsotics] Small Improvement on -Wmisleading-indentation 2019-12-12 14:52:47 +01:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema Correct gcc vector splat conversion from float to int-vector 2019-12-13 12:27:31 -08:00
Serialization [Support] Add TimeTraceScope constructor without detail arg 2019-12-11 14:32:21 +00:00
StaticAnalyzer [analyzer] Do not cache out on some shared implicit AST nodes 2019-12-11 17:15:12 -08:00
Tooling [Tooling/Syntax] Helpers to find spelled tokens touching a location. 2019-12-13 16:57:03 +01:00
CMakeLists.txt Reland [clang] DirectoryWatcher 2019-07-12 20:34:10 +00:00