[llvm] r347438 - [x86] use FileCheck to verify output; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 21 15:39:19 PST 2018
Author: spatel
Date: Wed Nov 21 15:39:19 2018
New Revision: 347438
URL: http://llvm.org/viewvc/llvm-project?rev=347438&view=rev
Log:
[x86] use FileCheck to verify output; NFC
Modified:
llvm/trunk/test/CodeGen/X86/2009-03-07-FPConstSelect.ll
Modified: llvm/trunk/test/CodeGen/X86/2009-03-07-FPConstSelect.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-03-07-FPConstSelect.ll?rev=347438&r1=347437&r2=347438&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2009-03-07-FPConstSelect.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2009-03-07-FPConstSelect.ll Wed Nov 21 15:39:19 2018
@@ -1,12 +1,18 @@
-; RUN: llc < %s -mcpu=yonah | not grep xmm
-; This should do a single load into the fp stack for the return, not diddle with xmm registers.
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=i386-- | FileCheck %s
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
-target triple = "i386-apple-darwin7"
+; This should do a single load into the fp stack for the return, not diddle with xmm registers.
define float @f(i32 %x) nounwind readnone {
-entry:
- %0 = icmp eq i32 %x, 0 ; <i1> [#uses=1]
- %iftmp.0.0 = select i1 %0, float 4.200000e+01, float 2.300000e+01
- ret float %iftmp.0.0
+; CHECK-LABEL: f:
+; CHECK: # %bb.0:
+; CHECK-NEXT: xorl %eax, %eax
+; CHECK-NEXT: cmpl $0, {{[0-9]+}}(%esp)
+; CHECK-NEXT: sete %al
+; CHECK-NEXT: flds {{\.LCPI.*}}(,%eax,4)
+; CHECK-NEXT: retl
+ %c = icmp eq i32 %x, 0
+ %r = select i1 %c, float 42.0, float 23.0
+ ret float %r
}
+
More information about the llvm-commits
mailing list