mkuper added a comment.

Thanks, Simon!
I've wanted to add the _undefined intrinsics for a while now, but never got to 
it.

Anyway, this sort of implementation somewhat worries me. 
Yes, I know that the gcc intrinsics do something very similar. 
And I also know that in practice we'll get an undef value, nothing worse 
(assuming reading an uninitialized automatic variable is undefined behavior to 
begin with - which really depends on the spec interpretation :-) ). 
And I know this isn't likely to change anytime soon.

Still, relying on what may be undefined behavior in the header files worries 
me, and I'd rather not have it implemented like that.
I was thinking about adding a __builtin_undef which explicitly resolves to an 
undef value. 
Does that make sense to you?


================
Comment at: test/CodeGen/sse-undefined.c:1
@@ +1,2 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -o - | not grep "xmm"
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -o - | not grep "ymm"
----------------
Perhaps a more explicit test?


Repository:
  rL LLVM

http://reviews.llvm.org/D12052



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to