llvm.org GIT mirror llvm / 0275b43
Merging r213899: ------------------------------------------------------------------------ r213899 | joerg | 2014-07-24 15:20:10 -0700 (Thu, 24 Jul 2014) | 2 lines Don't use 128bit functions on PPC32. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@214685 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 5 years ago
2 changed file(s) with 46 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
624624 setBooleanContents(ZeroOrOneBooleanContent);
625625 // Altivec instructions set fields to all zeros or all ones.
626626 setBooleanVectorContents(ZeroOrNegativeOneBooleanContent);
627
628 if (!isPPC64) {
629 // These libcalls are not available in 32-bit.
630 setLibcallName(RTLIB::SHL_I128, nullptr);
631 setLibcallName(RTLIB::SRL_I128, nullptr);
632 setLibcallName(RTLIB::SRA_I128, nullptr);
633 }
627634
628635 if (isPPC64) {
629636 setStackPointerRegisterToSaveRestore(PPC::X1);
0 ; RUN: llc -O=2 < %s -mtriple=powerpc-netbsd | FileCheck %s
1
2 ; CHECK-NOT: bl __lshrti3
3
4 ; ModuleID = 'lshrti3-ppc32.c'
5 target datalayout = "E-m:e-p:32:32-i64:64-n32"
6 target triple = "powerpc--netbsd"
7
8 ; Function Attrs: nounwind uwtable
9 define i32 @fn1() #0 {
10 entry:
11 %.promoted = load i72* inttoptr (i32 1 to i72*), align 4
12 br label %while.cond
13
14 while.cond: ; preds = %while.cond, %entry
15 %bf.set3 = phi i72 [ %bf.set, %while.cond ], [ %.promoted, %entry ]
16 %bf.lshr = lshr i72 %bf.set3, 40
17 %bf.lshr.tr = trunc i72 %bf.lshr to i32
18 %bf.cast = and i32 %bf.lshr.tr, 65535
19 %dec = add nsw i32 %bf.lshr.tr, 65535
20 %0 = zext i32 %dec to i72
21 %bf.value = shl nuw i72 %0, 40
22 %bf.shl = and i72 %bf.value, 72056494526300160
23 %bf.clear2 = and i72 %bf.set3, -72056494526300161
24 %bf.set = or i72 %bf.shl, %bf.clear2
25 %tobool = icmp eq i32 %bf.cast, 0
26 br i1 %tobool, label %while.end, label %while.cond
27
28 while.end: ; preds = %while.cond
29 %bf.set.lcssa = phi i72 [ %bf.set, %while.cond ]
30 store i72 %bf.set.lcssa, i72* inttoptr (i32 1 to i72*), align 4
31 ret i32 undef
32 }
33
34 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
35
36 !llvm.ident = !{!0}
37
38 !0 = metadata !{metadata !"clang version 3.5.0 (213754)"}