brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 2810a8a Raw
34 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly<no-default-opts>' -S < %s | FileCheck %s2;3; This caused the code generation to generate invalid code as the same BBMap was4; used for the whole non-affine region. When %add is synthesized for the5; incoming value of subregion_if first, the code for it was generated into6; subregion_if, but reused for the incoming value of subregion_exit, although it7; is not dominated by subregion_if.8;9; CHECK-LABEL: polly.stmt.subregion_entry:10; CHECK:         %[[R0:[0-9]*]] = add i32 %n, -211;12; CHECK-LABEL: polly.stmt.subregion_if:13; CHECK:         %[[R1:[0-9]*]] = add i32 %n, -214;15; CHECK-LABEL: polly.stmt.subregion_exit.region_exiting:16; CHECK:         %polly.retval = phi i32 [ %[[R1]], %polly.stmt.subregion_if ], [ %[[R0]], %polly.stmt.subregion_entry ]17 18define i32 @func(i32 %n){19entry:20  br label %subregion_entry21 22subregion_entry:23  %add = add nsw i32 %n, -224  %cmp = fcmp ogt float undef, undef25  br i1 %cmp, label %subregion_if, label %subregion_exit26 27subregion_if:28  br label %subregion_exit29 30subregion_exit:31  %retval = phi i32 [ %add, %subregion_if ], [ %add, %subregion_entry ]32  ret i32 %retval33}34