From: Evan Cheng Date: Mon, 22 Sep 2008 22:19:34 +0000 (+0000) Subject: Test case for fp logical instructions. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=bc09afa80ec06d564fda3995dac1a2da7136b33d;p=oota-llvm.git Test case for fp logical instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56474 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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; +}