1 ; REQUIRES: x86_64-linux
2 ; RUN: llc -stop-after=twoaddressinstruction -mtriple=x86_64-- -o - %s | FileCheck %s
5 define dso_local double @twoaddressinstruction(i1 %c) local_unnamed_addr {
7 %0 = load i64, ptr undef, align 8
8 br label %for.body14.preheader
10 for.body14.preheader: ; preds = %for.end
11 br i1 %c, label %for.cond25.preheader.loopexit.unr-lcssa, label %for.body14.preheader.new
13 for.body14.preheader.new: ; preds = %for.body14.preheader
14 %unroll_iter136 = and i64 %0, -4
17 for.cond25.preheader.loopexit.unr-lcssa: ; preds = %for.body14, %for.body14.preheader
18 %indvars.iv127.unr = phi i64 [ 1, %for.body14.preheader ], [ %indvars.iv.next128.3, %for.body14 ]
21 for.body14: ; preds = %for.body14, %for.body14.preheader.new
22 %indvars.iv127 = phi i64 [ 1, %for.body14.preheader.new ], [ %indvars.iv.next128.3, %for.body14 ]
23 %niter137 = phi i64 [ %unroll_iter136, %for.body14.preheader.new ], [ %niter137.nsub.3, %for.body14 ]
24 %indvars.iv.next128.3 = add nuw nsw i64 %indvars.iv127, 4
25 ; CHECK: PSEUDO_PROBE -6878943695821059507, 9, 0, 0
26 call void @llvm.pseudoprobe(i64 -6878943695821059507, i64 9, i32 0, i64 -1)
27 ;; Check an opeq form of instruction is created.
28 ; CHECK: %[[#REG:]]:gr64_nosp = COPY killed %[[#]]
29 ; CHECK: %[[#REG]]:gr64_nosp = nuw ADD64ri32 %[[#REG]], 4, implicit-def dead $eflags
30 %niter137.nsub.3 = add i64 %niter137, -4
31 %niter137.ncmp.3 = icmp eq i64 %niter137.nsub.3, 0
32 br i1 %niter137.ncmp.3, label %for.cond25.preheader.loopexit.unr-lcssa, label %for.body14
35 ; Function Attrs: inaccessiblememonly nounwind willreturn
36 declare void @llvm.pseudoprobe(i64, i64, i32, i64) #0
38 attributes #0 = { inaccessiblememonly nounwind willreturn }