Clang bug not fixed for more than 5 years. What to do?Is it possible to access internal values in a __m128 variable as attribute in a C++ class?Sum of the four 32bits elements of a _m128 vectorWhat is an undefined reference/unresolved external symbol error and how do I fix it?operator++ as both a postfix and prefix doesn't work with clangWhen does data move around between SSE registers and the stack?Replacing a 32-bit loop counter with 64-bit introduces crazy performance deviationsHow do I perform absolute value on double using intrinsics?Is this change in overload resolution between Clang 3.5 and 3.6 correct or a bug?FMA intrinsics not working: is it Hardware or Compiler?Clang fails to compile with -m32 on open SUSE Leap 15
Lost & Found Mobile Telepone
Why is the the worst case for this function O(n*n)
Capacitors with same voltage, same capacitance, same temp, different diameter?
What happens when a file that is 100% paged in to the page cache gets modified by another process
Why did Tony's Arc Reactor do this?
2 load centers under 1 meter: do you need bonding and main breakers at both?
How should Thaumaturgy's "three times as loud as normal" be interpreted?
Is future tense in English really a myth?
The pirate treasure of Leatherback Atoll
Leaving the USA for 10 yrs when you have asylum
After a few interviews, What should I do after told to wait?
Supervisor wants me to support a diploma-thesis software tool after I graduated
Distance faces never sharp/clear. Too picky?
How can I finish my PhD?
How to find a reviewer/editor for my paper?
Why would an AC motor heavily shake when driven with certain frequencies?
How to reference a custom counter that shows section number?
How to set any file manager in Linux to show the duration like the Length feature in Windows Explorer?
What's the biggest difference between these two photos?
Yet another calculator problem
When does order matter in probability?
Can you pop microwave popcorn on a stove?
Remove outer padding in tikzcd
More than three domains hosted on the same IP address
Clang bug not fixed for more than 5 years. What to do?
Is it possible to access internal values in a __m128 variable as attribute in a C++ class?Sum of the four 32bits elements of a _m128 vectorWhat is an undefined reference/unresolved external symbol error and how do I fix it?operator++ as both a postfix and prefix doesn't work with clangWhen does data move around between SSE registers and the stack?Replacing a 32-bit loop counter with 64-bit introduces crazy performance deviationsHow do I perform absolute value on double using intrinsics?Is this change in overload resolution between Clang 3.5 and 3.6 correct or a bug?FMA intrinsics not working: is it Hardware or Compiler?Clang fails to compile with -m32 on open SUSE Leap 15
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
x86 Clang has a bug that I reported back in 2013. It is confirmed, but they have never fixed it. What can I do to make them fix it?
The bug report is here: https://bugs.llvm.org/show_bug.cgi?id=17164
Description:
__m128 x; // vector of four float
__m128i y; // vector of four int
x = y; // does not convert int to float but preserves the bits
The intrinsic vector types such as __m128, __m128i, __m128d are silently bit-cast to each other which gives weird results. All other compilers treat these vector types as different types. There is no option that makes Clang compatible with other compilers for intrinsic vector types.
This is a big problem for the Vector class library ( https://www.agner.org/optimize/#vectorclass ). I don't know what to do to make them fix this bug. Please help.
c++ vector x86 clang simd
|
show 12 more comments
x86 Clang has a bug that I reported back in 2013. It is confirmed, but they have never fixed it. What can I do to make them fix it?
The bug report is here: https://bugs.llvm.org/show_bug.cgi?id=17164
Description:
__m128 x; // vector of four float
__m128i y; // vector of four int
x = y; // does not convert int to float but preserves the bits
The intrinsic vector types such as __m128, __m128i, __m128d are silently bit-cast to each other which gives weird results. All other compilers treat these vector types as different types. There is no option that makes Clang compatible with other compilers for intrinsic vector types.
This is a big problem for the Vector class library ( https://www.agner.org/optimize/#vectorclass ). I don't know what to do to make them fix this bug. Please help.
c++ vector x86 clang simd
1
I see how that's problematic for overload resolution, but I don't see why it's surprising thatx = y
copies the bits unchanged if it's going to not error. That's less surprising than an implicit_mm_cvtepi32_ps
. That would be super-weird, and be ambiguous for__m128d
(should it convert 2x double to 2x int64? Or should itcvtpd2dq
and leave 2int32_t
at the bottom of a vector?) Normally when I wish I could dox=y
without cluttering my code with_mm_castsi128_ps
, it's for usingshufps
ormovhps
on integer data, orpand
on FP data, or similar.
– Peter Cordes
Mar 28 at 7:52
1
I think this would be a better SO question if you include some of the specific cases you need to work around for clang, like the case from that bug you linked. SO is for programming questions, so are you asking for a technical workaround for clang allowing implicit conversion between different__m128
types? I.e. some way to write the class to compile without error, while still allowing users of VCL to freely mix VCL with_mm_*
intrinsics. If you're asking how to get clang developers to fix this, that sounds off topic.
– Peter Cordes
Mar 28 at 7:56
10
"What can I do to make them fix it?" Submit a pull request? Post on their mailing list and/or contact developers you might know directly? While I see the problem, I'm not sure that this type of question is a good fit for StackOverflow, since we really can't answer it, only make suggestions.
– Michael
Mar 28 at 7:56
3
We can only answer "how can I work around it".
– Passer By
Mar 28 at 8:08
5
If you want to fix the bug you either go ahead and do it (Clang is opensource) or pay someone to do it. That's a business matter, not suitable for SO. If you want to find a workaround, please state it explicitly. You can then use the configure/make machinery (e.g. autoconf, automake) to test for the bug and set/unset a preprocessor symbol accordingly (to select the right implementation).
– Margaret Bloom
Mar 28 at 9:52
|
show 12 more comments
x86 Clang has a bug that I reported back in 2013. It is confirmed, but they have never fixed it. What can I do to make them fix it?
The bug report is here: https://bugs.llvm.org/show_bug.cgi?id=17164
Description:
__m128 x; // vector of four float
__m128i y; // vector of four int
x = y; // does not convert int to float but preserves the bits
The intrinsic vector types such as __m128, __m128i, __m128d are silently bit-cast to each other which gives weird results. All other compilers treat these vector types as different types. There is no option that makes Clang compatible with other compilers for intrinsic vector types.
This is a big problem for the Vector class library ( https://www.agner.org/optimize/#vectorclass ). I don't know what to do to make them fix this bug. Please help.
c++ vector x86 clang simd
x86 Clang has a bug that I reported back in 2013. It is confirmed, but they have never fixed it. What can I do to make them fix it?
The bug report is here: https://bugs.llvm.org/show_bug.cgi?id=17164
Description:
__m128 x; // vector of four float
__m128i y; // vector of four int
x = y; // does not convert int to float but preserves the bits
The intrinsic vector types such as __m128, __m128i, __m128d are silently bit-cast to each other which gives weird results. All other compilers treat these vector types as different types. There is no option that makes Clang compatible with other compilers for intrinsic vector types.
This is a big problem for the Vector class library ( https://www.agner.org/optimize/#vectorclass ). I don't know what to do to make them fix this bug. Please help.
c++ vector x86 clang simd
c++ vector x86 clang simd
asked Mar 28 at 7:36
A FogA Fog
2,51721 silver badges18 bronze badges
2,51721 silver badges18 bronze badges
1
I see how that's problematic for overload resolution, but I don't see why it's surprising thatx = y
copies the bits unchanged if it's going to not error. That's less surprising than an implicit_mm_cvtepi32_ps
. That would be super-weird, and be ambiguous for__m128d
(should it convert 2x double to 2x int64? Or should itcvtpd2dq
and leave 2int32_t
at the bottom of a vector?) Normally when I wish I could dox=y
without cluttering my code with_mm_castsi128_ps
, it's for usingshufps
ormovhps
on integer data, orpand
on FP data, or similar.
– Peter Cordes
Mar 28 at 7:52
1
I think this would be a better SO question if you include some of the specific cases you need to work around for clang, like the case from that bug you linked. SO is for programming questions, so are you asking for a technical workaround for clang allowing implicit conversion between different__m128
types? I.e. some way to write the class to compile without error, while still allowing users of VCL to freely mix VCL with_mm_*
intrinsics. If you're asking how to get clang developers to fix this, that sounds off topic.
– Peter Cordes
Mar 28 at 7:56
10
"What can I do to make them fix it?" Submit a pull request? Post on their mailing list and/or contact developers you might know directly? While I see the problem, I'm not sure that this type of question is a good fit for StackOverflow, since we really can't answer it, only make suggestions.
– Michael
Mar 28 at 7:56
3
We can only answer "how can I work around it".
– Passer By
Mar 28 at 8:08
5
If you want to fix the bug you either go ahead and do it (Clang is opensource) or pay someone to do it. That's a business matter, not suitable for SO. If you want to find a workaround, please state it explicitly. You can then use the configure/make machinery (e.g. autoconf, automake) to test for the bug and set/unset a preprocessor symbol accordingly (to select the right implementation).
– Margaret Bloom
Mar 28 at 9:52
|
show 12 more comments
1
I see how that's problematic for overload resolution, but I don't see why it's surprising thatx = y
copies the bits unchanged if it's going to not error. That's less surprising than an implicit_mm_cvtepi32_ps
. That would be super-weird, and be ambiguous for__m128d
(should it convert 2x double to 2x int64? Or should itcvtpd2dq
and leave 2int32_t
at the bottom of a vector?) Normally when I wish I could dox=y
without cluttering my code with_mm_castsi128_ps
, it's for usingshufps
ormovhps
on integer data, orpand
on FP data, or similar.
– Peter Cordes
Mar 28 at 7:52
1
I think this would be a better SO question if you include some of the specific cases you need to work around for clang, like the case from that bug you linked. SO is for programming questions, so are you asking for a technical workaround for clang allowing implicit conversion between different__m128
types? I.e. some way to write the class to compile without error, while still allowing users of VCL to freely mix VCL with_mm_*
intrinsics. If you're asking how to get clang developers to fix this, that sounds off topic.
– Peter Cordes
Mar 28 at 7:56
10
"What can I do to make them fix it?" Submit a pull request? Post on their mailing list and/or contact developers you might know directly? While I see the problem, I'm not sure that this type of question is a good fit for StackOverflow, since we really can't answer it, only make suggestions.
– Michael
Mar 28 at 7:56
3
We can only answer "how can I work around it".
– Passer By
Mar 28 at 8:08
5
If you want to fix the bug you either go ahead and do it (Clang is opensource) or pay someone to do it. That's a business matter, not suitable for SO. If you want to find a workaround, please state it explicitly. You can then use the configure/make machinery (e.g. autoconf, automake) to test for the bug and set/unset a preprocessor symbol accordingly (to select the right implementation).
– Margaret Bloom
Mar 28 at 9:52
1
1
I see how that's problematic for overload resolution, but I don't see why it's surprising that
x = y
copies the bits unchanged if it's going to not error. That's less surprising than an implicit _mm_cvtepi32_ps
. That would be super-weird, and be ambiguous for __m128d
(should it convert 2x double to 2x int64? Or should it cvtpd2dq
and leave 2 int32_t
at the bottom of a vector?) Normally when I wish I could do x=y
without cluttering my code with _mm_castsi128_ps
, it's for using shufps
or movhps
on integer data, or pand
on FP data, or similar.– Peter Cordes
Mar 28 at 7:52
I see how that's problematic for overload resolution, but I don't see why it's surprising that
x = y
copies the bits unchanged if it's going to not error. That's less surprising than an implicit _mm_cvtepi32_ps
. That would be super-weird, and be ambiguous for __m128d
(should it convert 2x double to 2x int64? Or should it cvtpd2dq
and leave 2 int32_t
at the bottom of a vector?) Normally when I wish I could do x=y
without cluttering my code with _mm_castsi128_ps
, it's for using shufps
or movhps
on integer data, or pand
on FP data, or similar.– Peter Cordes
Mar 28 at 7:52
1
1
I think this would be a better SO question if you include some of the specific cases you need to work around for clang, like the case from that bug you linked. SO is for programming questions, so are you asking for a technical workaround for clang allowing implicit conversion between different
__m128
types? I.e. some way to write the class to compile without error, while still allowing users of VCL to freely mix VCL with _mm_*
intrinsics. If you're asking how to get clang developers to fix this, that sounds off topic.– Peter Cordes
Mar 28 at 7:56
I think this would be a better SO question if you include some of the specific cases you need to work around for clang, like the case from that bug you linked. SO is for programming questions, so are you asking for a technical workaround for clang allowing implicit conversion between different
__m128
types? I.e. some way to write the class to compile without error, while still allowing users of VCL to freely mix VCL with _mm_*
intrinsics. If you're asking how to get clang developers to fix this, that sounds off topic.– Peter Cordes
Mar 28 at 7:56
10
10
"What can I do to make them fix it?" Submit a pull request? Post on their mailing list and/or contact developers you might know directly? While I see the problem, I'm not sure that this type of question is a good fit for StackOverflow, since we really can't answer it, only make suggestions.
– Michael
Mar 28 at 7:56
"What can I do to make them fix it?" Submit a pull request? Post on their mailing list and/or contact developers you might know directly? While I see the problem, I'm not sure that this type of question is a good fit for StackOverflow, since we really can't answer it, only make suggestions.
– Michael
Mar 28 at 7:56
3
3
We can only answer "how can I work around it".
– Passer By
Mar 28 at 8:08
We can only answer "how can I work around it".
– Passer By
Mar 28 at 8:08
5
5
If you want to fix the bug you either go ahead and do it (Clang is opensource) or pay someone to do it. That's a business matter, not suitable for SO. If you want to find a workaround, please state it explicitly. You can then use the configure/make machinery (e.g. autoconf, automake) to test for the bug and set/unset a preprocessor symbol accordingly (to select the right implementation).
– Margaret Bloom
Mar 28 at 9:52
If you want to fix the bug you either go ahead and do it (Clang is opensource) or pay someone to do it. That's a business matter, not suitable for SO. If you want to find a workaround, please state it explicitly. You can then use the configure/make machinery (e.g. autoconf, automake) to test for the bug and set/unset a preprocessor symbol accordingly (to select the right implementation).
– Margaret Bloom
Mar 28 at 9:52
|
show 12 more comments
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392309%2fclang-bug-not-fixed-for-more-than-5-years-what-to-do%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392309%2fclang-bug-not-fixed-for-more-than-5-years-what-to-do%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I see how that's problematic for overload resolution, but I don't see why it's surprising that
x = y
copies the bits unchanged if it's going to not error. That's less surprising than an implicit_mm_cvtepi32_ps
. That would be super-weird, and be ambiguous for__m128d
(should it convert 2x double to 2x int64? Or should itcvtpd2dq
and leave 2int32_t
at the bottom of a vector?) Normally when I wish I could dox=y
without cluttering my code with_mm_castsi128_ps
, it's for usingshufps
ormovhps
on integer data, orpand
on FP data, or similar.– Peter Cordes
Mar 28 at 7:52
1
I think this would be a better SO question if you include some of the specific cases you need to work around for clang, like the case from that bug you linked. SO is for programming questions, so are you asking for a technical workaround for clang allowing implicit conversion between different
__m128
types? I.e. some way to write the class to compile without error, while still allowing users of VCL to freely mix VCL with_mm_*
intrinsics. If you're asking how to get clang developers to fix this, that sounds off topic.– Peter Cordes
Mar 28 at 7:56
10
"What can I do to make them fix it?" Submit a pull request? Post on their mailing list and/or contact developers you might know directly? While I see the problem, I'm not sure that this type of question is a good fit for StackOverflow, since we really can't answer it, only make suggestions.
– Michael
Mar 28 at 7:56
3
We can only answer "how can I work around it".
– Passer By
Mar 28 at 8:08
5
If you want to fix the bug you either go ahead and do it (Clang is opensource) or pay someone to do it. That's a business matter, not suitable for SO. If you want to find a workaround, please state it explicitly. You can then use the configure/make machinery (e.g. autoconf, automake) to test for the bug and set/unset a preprocessor symbol accordingly (to select the right implementation).
– Margaret Bloom
Mar 28 at 9:52