From aaac00a9f6bfd4744466799949018a45ac1f4d55 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 22 Sep 2008 22:19:34 +0000 Subject: Test case for fp logical instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56474 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/FrontendC/fp-logical.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/FrontendC/fp-logical.c (limited to 'test/FrontendC') 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; +} -- cgit v1.1