mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
Merge pull request #21124 from jketema/jketema/vec-expr
C++: Add tests for logical vector operations
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@ invalidOverlap
|
||||
nonUniqueEnclosingIRFunction
|
||||
fieldAddressOnNonPointer
|
||||
thisArgumentIsNonPointer
|
||||
| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
|
||||
| ir.cpp:2548:34:2548:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2547:6:2547:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
|
||||
nonUniqueIRVariable
|
||||
nonBooleanOperand
|
||||
missingCppType
|
||||
|
||||
@@ -27,7 +27,7 @@ invalidOverlap
|
||||
nonUniqueEnclosingIRFunction
|
||||
fieldAddressOnNonPointer
|
||||
thisArgumentIsNonPointer
|
||||
| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
|
||||
| ir.cpp:2548:34:2548:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2547:6:2547:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
|
||||
nonUniqueIRVariable
|
||||
nonBooleanOperand
|
||||
missingCppType
|
||||
|
||||
@@ -1214,6 +1214,8 @@ void VectorTypes(int i) {
|
||||
vi4[i] = x;
|
||||
vector(4, int) vi4_shuffle = __builtin_shufflevector(vi4, vi4, 3+0, 2, 1, 0);
|
||||
vi4 = vi4 + vi4_shuffle;
|
||||
vi4 = vi4 && vi4_shuffle;
|
||||
vi4 = vi4 || vi4_shuffle;
|
||||
}
|
||||
|
||||
void *memcpy(void *dst, void *src, int size);
|
||||
|
||||
@@ -20,7 +20,7 @@ multipleIRTypes
|
||||
lostReachability
|
||||
backEdgeCountMismatch
|
||||
useNotDominatedByDefinition
|
||||
| ir.cpp:1535:8:1535:8 | Unary | Operand 'Unary' is not dominated by its definition in function '$@'. | ir.cpp:1535:8:1535:8 | void StructuredBindingDataMemberStruct::StructuredBindingDataMemberStruct() | void StructuredBindingDataMemberStruct::StructuredBindingDataMemberStruct() |
|
||||
| ir.cpp:1537:8:1537:8 | Unary | Operand 'Unary' is not dominated by its definition in function '$@'. | ir.cpp:1537:8:1537:8 | void StructuredBindingDataMemberStruct::StructuredBindingDataMemberStruct() | void StructuredBindingDataMemberStruct::StructuredBindingDataMemberStruct() |
|
||||
switchInstructionWithoutDefaultEdge
|
||||
notMarkedAsConflated
|
||||
wronglyMarkedAsConflated
|
||||
@@ -28,7 +28,7 @@ invalidOverlap
|
||||
nonUniqueEnclosingIRFunction
|
||||
fieldAddressOnNonPointer
|
||||
thisArgumentIsNonPointer
|
||||
| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
|
||||
| ir.cpp:2548:34:2548:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2547:6:2547:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
|
||||
nonUniqueIRVariable
|
||||
nonBooleanOperand
|
||||
missingCppType
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@ invalidOverlap
|
||||
nonUniqueEnclosingIRFunction
|
||||
fieldAddressOnNonPointer
|
||||
thisArgumentIsNonPointer
|
||||
| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
|
||||
| ir.cpp:2548:34:2548:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2547:6:2547:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
|
||||
nonUniqueIRVariable
|
||||
nonBooleanOperand
|
||||
missingCppType
|
||||
|
||||
@@ -27,7 +27,7 @@ invalidOverlap
|
||||
nonUniqueEnclosingIRFunction
|
||||
fieldAddressOnNonPointer
|
||||
thisArgumentIsNonPointer
|
||||
| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
|
||||
| ir.cpp:2548:34:2548:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2547:6:2547:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
|
||||
nonUniqueIRVariable
|
||||
nonBooleanOperand
|
||||
missingCppType
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
| vector_types2.cpp:10:15:10:42 | __builtin_shuffle |
|
||||
| vector_types2.cpp:11:15:11:45 | __builtin_shuffle |
|
||||
| vector_types.cpp:31:13:31:49 | __builtin_shufflevector |
|
||||
| vector_types.cpp:58:10:58:52 | __builtin_convertvector |
|
||||
| vector_types.cpp:63:10:63:52 | __builtin_convertvector |
|
||||
|
||||
@@ -34,4 +34,7 @@
|
||||
| vector_types.cpp:47:23:47:25 | dst | dst | file://:0:0:0:0 | v16i * | 8 |
|
||||
| vector_types.cpp:47:34:47:36 | src | src | file://:0:0:0:0 | v16i * | 8 |
|
||||
| vector_types.cpp:47:43:47:43 | n | n | file://:0:0:0:0 | int | 4 |
|
||||
| vector_types.cpp:57:43:57:44 | vf | vf | vector_types.cpp:55:16:55:27 | vector4float | 16 |
|
||||
| vector_types.cpp:54:20:54:22 | dst | dst | file://:0:0:0:0 | v16i * | 8 |
|
||||
| vector_types.cpp:54:31:54:34 | src1 | src1 | file://:0:0:0:0 | v16i * | 8 |
|
||||
| vector_types.cpp:54:43:54:46 | src2 | src2 | file://:0:0:0:0 | v16i * | 8 |
|
||||
| vector_types.cpp:62:43:62:44 | vf | vf | vector_types.cpp:60:16:60:27 | vector4float | 16 |
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
| vector_types.cpp:21:10:21:18 | ... < ... | < | file://:0:0:0:0 | __attribute((vector_size(16))) int |
|
||||
| vector_types.cpp:51:10:51:18 | ... << ... | << | file://:0:0:0:0 | __attribute((vector_size(16))) int |
|
||||
| vector_types.cpp:51:18:51:18 | (vector fill) ... | (vector fill) | file://:0:0:0:0 | __attribute((vector_size(16))) int |
|
||||
| vector_types.cpp:55:10:55:23 | ... && ... | && | file://:0:0:0:0 | __attribute((vector_size(16))) int |
|
||||
| vector_types.cpp:56:10:56:23 | ... \|\| ... | \|\| | file://:0:0:0:0 | __attribute((vector_size(16))) int |
|
||||
|
||||
@@ -51,6 +51,11 @@ void shift_left(v16i *dst, v16i *src, int n) {
|
||||
*dst = *src << n;
|
||||
}
|
||||
|
||||
void logical(v16i *dst, v16i *src1, v16i *src2) {
|
||||
*dst = *src1 && *src2;
|
||||
*dst = *src1 || *src2;
|
||||
}
|
||||
|
||||
typedef double vector4double __attribute__((__vector_size__(32)));
|
||||
typedef float vector4float __attribute__((__vector_size__(16)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user