brintos

brintos / llvm-project-archived public Read only

0
0
Text · 825 B · 9559ff6 Raw
23 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; This should compile to movl $2147483647, %eax + andl only.3; RUN: llc < %s | FileCheck %s4; rdar://57365745 6target 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"7target triple = "i686-apple-darwin8"8 9define i32 @foo(double %x) nounwind  {10; CHECK-LABEL: foo:11; CHECK:       ## %bb.0: ## %entry12; CHECK-NEXT:    movl $2147483647, %eax ## imm = 0x7FFFFFFF13; CHECK-NEXT:    andl {{[0-9]+}}(%esp), %eax14; CHECK-NEXT:    retl15entry:16	%x15 = bitcast double %x to i64		; <i64> [#uses=1]17	%tmp713 = lshr i64 %x15, 32		; <i64> [#uses=1]18	%tmp714 = trunc i64 %tmp713 to i32		; <i32> [#uses=1]19	%tmp8 = and i32 %tmp714, 2147483647		; <i32> [#uses=1]20	ret i32 %tmp821}22 23