1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; This should compile to movl $2147483647, %eax + andl only. 3; RUN: llc < %s | FileCheck %s 4; rdar://5736574 5 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: ## %entry 12; CHECK-NEXT: movl $2147483647, %eax ## imm = 0x7FFFFFFF 13; CHECK-NEXT: andl {{[0-9]+}}(%esp), %eax 14; CHECK-NEXT: retl 15entry: 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 %tmp8 21} 22 23