From bc09afa80ec06d564fda3995dac1a2da7136b33d Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 22 Sep 2008 22:19:34 +0000 Subject: [PATCH] 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 diff --git a/test/FrontendC/fp-logical.c b/test/FrontendC/fp-logical.c new file mode 100644 index 00000000000..518db651179 --- /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; +} -- 2.34.1