41 lines · plain
1; REQUIRES: arm-registered-target2; RUN: opt -S -loop-unroll -codegenprepare < %s -domtree -verify-dom-info | FileCheck %s3;4; Checks that the dom tree is properly invalidated after an operation that will5; invalidate it in CodeGenPrepare. If the domtree isn't properly invalidated,6; this will likely segfault, or print badref.7 8; CHECK: @f9 10target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"11target triple = "armv7--linux-gnueabihf"12 13define i32 @f(i32 %a) {14entry:15 br label %for.body16 17for.cond.cleanup:18 ret i32 %or19 20for.body:21 %i.08 = phi i32 [ 0, %entry ], [ %inc, %for.body ]22 %b.07 = phi i32 [ 0, %entry ], [ %or, %for.body ]23 %shr = lshr i32 %a, %i.0824 %and = and i32 %shr, 125 %sub = sub nuw nsw i32 31, %i.0826 %shl = shl i32 %and, %sub27 %or = or i32 %shl, %b.0728 %inc = add nuw nsw i32 %i.08, 129 %exitcond = icmp eq i32 %inc, 3230 br i1 %exitcond, label %for.cond.cleanup, label %for.body, !llvm.loop !331}32 33!llvm.module.flags = !{!0, !1}34!llvm.ident = !{!2}35 36!0 = !{i32 1, !"wchar_size", i32 4}37!1 = !{i32 1, !"min_enum_size", i32 4}38!2 = !{!"clang version 3.8.0"}39!3 = distinct !{!3, !4}40!4 = !{!"llvm.loop.unroll.full"}41