diff options
| author | Cody Tapscott <topolarity@tapscott.me> | 2022-04-26 15:19:55 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-04-27 12:22:20 -0700 |
| commit | 7d6a6ce87fde465ffc3bd6b0a8bb6e039c67268f (patch) | |
| tree | 0f082b98f1693e7bbff34b27a3a256041f8edc7c /src/zig_llvm.cpp | |
| parent | 0e8242b905514f838f36757f2f890241e7448554 (diff) | |
| download | zig-7d6a6ce87fde465ffc3bd6b0a8bb6e039c67268f.tar.gz zig-7d6a6ce87fde465ffc3bd6b0a8bb6e039c67268f.zip | |
stage2: Manually lower softfloat ops when needed
Updates stage2 to manually lower softfloat operations for all unary
floating point operations and arithmetic.
Softfloat support still needs to be added for conversion operators
(float<->float and int<->float)
Diffstat (limited to 'src/zig_llvm.cpp')
| -rw-r--r-- | src/zig_llvm.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp index 0b0b33b8d9..78082abf88 100644 --- a/src/zig_llvm.cpp +++ b/src/zig_llvm.cpp @@ -541,6 +541,10 @@ LLVMValueRef ZigLLVMBuildUShlSat(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRe return wrap(call_inst); } +LLVMValueRef LLVMBuildVectorSplat(LLVMBuilderRef B, unsigned elem_count, LLVMValueRef V, const char *Name) { + return wrap(unwrap(B)->CreateVectorSplat(elem_count, unwrap(V), Name)); +} + void ZigLLVMFnSetSubprogram(LLVMValueRef fn, ZigLLVMDISubprogram *subprogram) { assert( isa<Function>(unwrap(fn)) ); Function *unwrapped_function = reinterpret_cast<Function*>(unwrap(fn)); |
