Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/test/CodeGen/X86/movmsk.ll
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | entry: | ||||
%__f.i = getelementptr inbounds %union.anon, %union.anon* %__u.i, i64 0, i32 0 | %__f.i = getelementptr inbounds %union.anon, %union.anon* %__u.i, i64 0, i32 0 | ||||
store float %add, float* %__f.i, align 4 | store float %add, float* %__f.i, align 4 | ||||
%2 = bitcast float %add to i32 | %2 = bitcast float %add to i32 | ||||
%shr.i = lshr i32 %2, 31 | %shr.i = lshr i32 %2, 31 | ||||
ret i32 %shr.i | ret i32 %shr.i | ||||
} | } | ||||
; PR11570 | ; PR11570 | ||||
; FIXME: This should also use movmskps; we don't form the FGETSIGN node | |||||
; in this case, though. | |||||
define void @float_call_signbit(double %n) { | define void @float_call_signbit(double %n) { | ||||
; CHECK-LABEL: float_call_signbit: | ; CHECK-LABEL: float_call_signbit: | ||||
; CHECK: ## %bb.0: ## %entry | ; CHECK: ## %bb.0: ## %entry | ||||
; CHECK-NEXT: movq %xmm0, %rdi | ; CHECK-NEXT: movmskpd %xmm0, %edi | ||||
; CHECK-NEXT: shrq $63, %rdi | ; CHECK-NEXT: andl $1, %edi | ||||
; CHECK-NEXT: ## kill: def $edi killed $edi killed $rdi | |||||
; CHECK-NEXT: jmp _float_call_signbit_callee ## TAILCALL | ; CHECK-NEXT: jmp _float_call_signbit_callee ## TAILCALL | ||||
entry: | entry: | ||||
%t0 = bitcast double %n to i64 | %t0 = bitcast double %n to i64 | ||||
%tobool.i.i.i.i = icmp slt i64 %t0, 0 | %tobool.i.i.i.i = icmp slt i64 %t0, 0 | ||||
tail call void @float_call_signbit_callee(i1 zeroext %tobool.i.i.i.i) | tail call void @float_call_signbit_callee(i1 zeroext %tobool.i.i.i.i) | ||||
ret void | ret void | ||||
} | } | ||||
declare void @float_call_signbit_callee(i1 zeroext) | declare void @float_call_signbit_callee(i1 zeroext) | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |