• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -enable-mssa-loop-dependency=false -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown < %s  | \
3; RUN:   FileCheck %s
4; RUN: llc -enable-mssa-loop-dependency=true -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown < %s  | \
5; RUN:   FileCheck %s --check-prefix=MSSA
6; Function Attrs: nounwind
7define void @ec_GFp_nistp256_points_mul() {
8; CHECK-LABEL: ec_GFp_nistp256_points_mul:
9; CHECK:    ld 5, 0(3)
10; CHECK:    li 3, 127
11; CHECK:    li 4, 0
12; CHECK:    subfic 6, 5, 0
13; CHECK:    subfze 6, 4
14; CHECK:    sradi 7, 6, 63
15; CHECK:    srad 6, 6, 3
16; CHECK:    subc 5, 7, 5
17; CHECK:    subfe 5, 4, 6
18; CHECK:    sradi 5, 5, 63
19
20; With MemorySSA, everything is taken out of the loop by licm.
21; Loads and stores to undef are treated as non-aliasing.
22; MSSA-LABEL: ec_GFp_nistp256_points_mul
23; MSSA:     ld 3, 0(3)
24; MSSA:     li 4, 0
25; MSSA:     subfic 5, 3, 0
26; MSSA:     subfze 5, 4
27; MSSA:     sradi 5, 5, 63
28; MSSA:     subc 3, 5, 3
29; MSSA:     subfe 3, 4, 5
30; MSSA:     sradi 3, 3, 63
31; MSSA:     std 3, 0(3)
32entry:
33  br label %fe_cmovznz.exit.i534.i.15
34
35fe_cmovznz.exit.i534.i.15:                        ; preds = %fe_cmovznz.exit.i534.i.15, %entry
36  %0 = load i64, i64* undef, align 8
37  %1 = load i64, i64* undef, align 8
38  %conv.i69.i.i = zext i64 %0 to i128
39  %sub.i72.i.i = sub nsw i128 0, %conv.i69.i.i
40  %conv.i63.i.i = zext i64 %1 to i128
41  %add.neg.i.i.i = ashr i128 %sub.i72.i.i, 127
42  %sub.i65.i.i = sub nsw i128 %add.neg.i.i.i, %conv.i63.i.i
43  %sub.i65.lobit.i.i = ashr i128 %sub.i65.i.i, 127
44  %conv1.i58.i.i = and i128 %sub.i65.lobit.i.i, 18446744073709551615
45  %add3.i59.i.i = add nuw nsw i128 %conv1.i58.i.i, 0
46  %conv4.i60.i.i = trunc i128 %add3.i59.i.i to i64
47  store i64 %conv4.i60.i.i, i64* undef, align 16
48  br label %fe_cmovznz.exit.i534.i.15
49}
50
51