[llvm-bugs] [Bug 37755] New: Implement __shiftright128 for x86_64-pc-windows-msvc
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jun 8 19:03:03 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37755
Bug ID: 37755
Summary: Implement __shiftright128 for x86_64-pc-windows-msvc
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: sfinae at hotmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 20415
--> https://bugs.llvm.org/attachment.cgi?id=20415&action=edit
Test case
This intrinsic makes https://github.com/ulfjack/ryu more efficient on x64
Windows.
C:\Temp>type repro.cpp
#ifndef _M_X64
#error This repro requires x64.
#endif
// https://docs.microsoft.com/en-us/cpp/intrinsics/shiftright128
#include <intrin.h>
#include <stdio.h>
int main() {
const unsigned long long val = __shiftright128(0x0102030405060708ull,
0xA0B0C0D0E0F0AABBull, 20);
if (val == 0x0AABB01020304050ull) {
puts("PASS");
} else {
printf("FAIL, this should be 0AABB01020304050: %016llX\n", val);
}
}
C:\Temp>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.15.26504 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
C:\Temp>cl /EHsc /nologo /W4 repro.cpp && repro
repro.cpp
PASS
C:\Temp>clang-cl -m64 -v
clang version 6.0.0 (tags/RELEASE_600/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: S:\msvc\src\vctools\NonShip\ClangLLVM\bin
C:\Temp>clang-cl -m64 /EHsc /nologo /W4 repro.cpp && repro
repro-128dd8.obj : error LNK2019: unresolved external symbol __shiftright128
referenced in function main
repro.exe : fatal error LNK1120: 1 unresolved externals
clang-cl.exe: error: linker command failed with exit code 1120 (use -v to see
invocation)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180609/25440d16/attachment-0001.html>
More information about the llvm-bugs
mailing list