mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 04:46:27 +08:00
3625f3efad53bd9f18d57d54573e62eb6cbfebc5
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
…
Languages
LLVM
41.4%
C++
31.4%
C
13%
Assembly
9.6%
MLIR
1.5%
Other
2.7%