diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-09-22 22:19:34 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-09-22 22:19:34 +0000 |
commit | aaac00a9f6bfd4744466799949018a45ac1f4d55 (patch) | |
tree | 5cf54b95d7eb4afba197a08ff841c6b8bd15a863 /test/FrontendC | |
parent | c0156c44a0a7ff93f0e1a28afcebbc5fbc364ecb (diff) | |
download | external_llvm-aaac00a9f6bfd4744466799949018a45ac1f4d55.zip external_llvm-aaac00a9f6bfd4744466799949018a45ac1f4d55.tar.gz external_llvm-aaac00a9f6bfd4744466799949018a45ac1f4d55.tar.bz2 |
Test case for fp logical instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendC')
-rw-r--r-- | test/FrontendC/fp-logical.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/FrontendC/fp-logical.c b/test/FrontendC/fp-logical.c new file mode 100644 index 0000000..518db65 --- /dev/null +++ b/test/FrontendC/fp-logical.c @@ -0,0 +1,9 @@ +// RUN: %llvmgcc %s -S -o - | grep bitcast | count 5 + +typedef float vFloat __attribute__ ((__vector_size__ (16))); +typedef unsigned int vUInt32 __attribute__ ((__vector_size__ (16))); +void foo(vFloat *X) { + vFloat NoSignBit = (vFloat) ~ (vUInt32) (vFloat) { -0.f, -0.f, -0.f, -0.f }; + vFloat ExtremeValue = *X & NoSignBit; + *X = ExtremeValue; +} |