[llvm-commits] [llvm] r56474 - /llvm/trunk/test/FrontendC/fp-logical.c

Evan Cheng evan.cheng at apple.com
Mon Sep 22 15:19:34 PDT 2008


Author: evancheng
Date: Mon Sep 22 17:19:34 2008
New Revision: 56474

URL: http://llvm.org/viewvc/llvm-project?rev=56474&view=rev
Log:
Test case for fp logical instructions.

Added:
    llvm/trunk/test/FrontendC/fp-logical.c

Added: llvm/trunk/test/FrontendC/fp-logical.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/fp-logical.c?rev=56474&view=auto

==============================================================================
--- llvm/trunk/test/FrontendC/fp-logical.c (added)
+++ llvm/trunk/test/FrontendC/fp-logical.c Mon Sep 22 17:19:34 2008
@@ -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;
+}





More information about the llvm-commits mailing list