llvm-project/clang/lib
Guozhi Wei 3625f3efad [CGExprScalar] In EmitCompare trunc the result if it has different type as E->getType()
Usually compare expression should return i1 type, so EmitScalarConversion is called before return

return EmitScalarConversion(Result, CGF.getContext().BoolTy, E->getType(), E->getExprLoc());

But when ppc intrinsic is called to compare vectors, the ppc intrinsic can return i32 even E->getType() is BoolTy, in this case EmitScalarConversion does nothing, an i32 type result is returned and causes crash later.

This patch detects this case and truncates the result before return.

Differential Revision: https://reviews.llvm.org/D38656

llvm-svn: 315358
2017-10-10 20:31:27 +00:00
..
ARCMigrate Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC. 2017-06-03 06:23:19 +00:00
AST Revert "[Modules TS] Module ownership semantics for redeclarations." 2017-10-10 13:09:40 +00:00
ASTMatchers [ASTMatchers] Don't create a copy of a std::set when iterating over it. 2017-10-10 07:21:34 +00:00
Analysis [Analyzer] Do not segfault on unexpected call_once implementation 2017-10-09 23:20:46 +00:00
Basic Driver: hoist the `wchar_t` handling to the driver 2017-10-06 23:09:55 +00:00
CodeGen [CGExprScalar] In EmitCompare trunc the result if it has different type as E->getType() 2017-10-10 20:31:27 +00:00
CrossTU Fix implicit-fallthrough warning by adding missing break 2017-09-24 15:17:46 +00:00
Driver Testing commit access. 2017-10-09 19:07:09 +00:00
Edit [clang] Fix format specifiers fixits for nested macros 2017-06-20 20:46:58 +00:00
Format [clang-format] Fix regression about short functions after #else 2017-10-02 15:53:37 +00:00
Frontend Set PreprocessorOpts.GeneratePreamble=true in PrecompiledPreamble. 2017-10-09 16:52:12 +00:00
FrontendTool Update after LLVM change r309087 2017-07-26 09:10:17 +00:00
Headers [CUDA] Fix name of __activemask() 2017-10-02 17:50:11 +00:00
Index R13575: Fix USR mangling for function pointer types 2017-10-10 00:35:16 +00:00
Lex Add parens around the boolean condition of one of the added asserts in r314747 ... 2017-10-03 01:33:36 +00:00
Parse Remove unused variables. No functionality change. 2017-10-08 21:23:02 +00:00
Rewrite [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output 2017-08-03 18:12:22 +00:00
Sema For dllexport class templates, export specializations of member functions (PR34849) (take 2) 2017-10-10 16:53:25 +00:00
Serialization Fix a (slightly weird) 'comma operator within array index expression' warning on VS builds. NFCI. 2017-10-10 13:56:17 +00:00
StaticAnalyzer [analyzer] MisusedMovedObject: Fix state-resetting a base-class sub-object. 2017-10-10 11:55:56 +00:00
Tooling Revert r315087 2017-10-06 19:49:29 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00