aboutsummaryrefslogtreecommitdiff
path: root/src/all_types.hpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-09-19 17:02:32 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-09-19 17:02:32 -0400
commit8a30edcde82dfcd36c3eec2fb7bcd5af549325cf (patch)
tree9d45053a816d85e72daee5c168a20259be585871 /src/all_types.hpp
parent5e34fb35972b8ff2ec0a420779b689229d05c659 (diff)
parent925ffbce7f424548be9eb42eb3914d5035066003 (diff)
downloadzig-8a30edcde82dfcd36c3eec2fb7bcd5af549325cf.tar.gz
zig-8a30edcde82dfcd36c3eec2fb7bcd5af549325cf.zip
Merge remote-tracking branch 'origin/master' into llvm9
Diffstat (limited to 'src/all_types.hpp')
-rw-r--r--src/all_types.hpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/all_types.hpp b/src/all_types.hpp
index 60b292662d..695f22ac90 100644
--- a/src/all_types.hpp
+++ b/src/all_types.hpp
@@ -1351,7 +1351,7 @@ struct ZigTypeBoundFn {
};
struct ZigTypeVector {
- // The type must be a pointer, integer, or float
+ // The type must be a pointer, integer, bool, or float
ZigType *elem_type;
uint32_t len;
};
@@ -1611,6 +1611,8 @@ enum BuiltinFnId {
BuiltinFnIdIntToEnum,
BuiltinFnIdIntType,
BuiltinFnIdVectorType,
+ BuiltinFnIdShuffle,
+ BuiltinFnIdSplat,
BuiltinFnIdSetCold,
BuiltinFnIdSetRuntimeSafety,
BuiltinFnIdSetFloatMode,
@@ -1770,6 +1772,7 @@ struct ZigLLVMFnKey {
} overflow_arithmetic;
struct {
uint32_t bit_count;
+ uint32_t vector_len; // 0 means not a vector
} bswap;
struct {
uint32_t bit_count;
@@ -2428,6 +2431,9 @@ enum IrInstructionId {
IrInstructionIdBoolToInt,
IrInstructionIdIntType,
IrInstructionIdVectorType,
+ IrInstructionIdShuffleVector,
+ IrInstructionIdSplatSrc,
+ IrInstructionIdSplatGen,
IrInstructionIdBoolNot,
IrInstructionIdMemset,
IrInstructionIdMemcpy,
@@ -3669,6 +3675,28 @@ struct IrInstructionVectorToArray {
IrInstruction *result_loc;
};
+struct IrInstructionShuffleVector {
+ IrInstruction base;
+
+ IrInstruction *scalar_type;
+ IrInstruction *a;
+ IrInstruction *b;
+ IrInstruction *mask; // This is in zig-format, not llvm format
+};
+
+struct IrInstructionSplatSrc {
+ IrInstruction base;
+
+ IrInstruction *len;
+ IrInstruction *scalar;
+};
+
+struct IrInstructionSplatGen {
+ IrInstruction base;
+
+ IrInstruction *scalar;
+};
+
struct IrInstructionAssertZero {
IrInstruction base;