brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 40e80a4 Raw
72 lines · plain
1; RUN: llc -verify-machineinstrs -mcpu=i386 < %s2target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"3target triple = "i386-pc-linux-gnu"4 5; The bb.i basic block gets split while emitting the schedule because6; -mcpu=i386 doesn't have CMOV.'7;8; That causes the PHI to be updated wrong because the jumptable data structure is remembering the original MBB.9;10; -cgp-critical-edge-splitting=0 prevents the edge to PHI from being split.11 12@.str146 = external constant [4 x i8], align 113@.str706 = external constant [4 x i8], align 114@.str1189 = external constant [5 x i8], align 115 16declare i32 @memcmp(ptr nocapture, ptr nocapture, i32) nounwind readonly17declare i32 @strlen(ptr nocapture) nounwind readonly18 19define hidden zeroext i8 @f(ptr %this, ptr %Name.0, i32 %Name.1, ptr noalias %NameLoc, ptr %Operands) nounwind align 2 {20bb.i:21  %0 = icmp eq i8 undef, 022  %iftmp.285.0 = select i1 %0, ptr @.str1189, ptr @.str70623  %1 = call i32 @strlen(ptr %iftmp.285.0) nounwind readonly24  switch i32 %Name.1, label %_ZNK4llvm12StringSwitchINS_9StringRefES1_E7DefaultERKS1_.exit [25    i32 3, label %bb1.i26    i32 4, label %bb1.i123727    i32 5, label %bb1.i126628    i32 6, label %bb1.i127529    i32 2, label %bb1.i143430    i32 8, label %bb1.i152331    i32 7, label %bb1.i153732  ]33 34bb1.i:                                            ; preds = %bb.i35  unreachable36 37bb1.i1237:                                        ; preds = %bb.i38  br i1 undef, label %bb.i1820, label %bb1.i124139 40bb1.i1241:                                        ; preds = %bb1.i123741  unreachable42 43bb1.i1266:                                        ; preds = %bb.i44  unreachable45 46bb1.i1275:                                        ; preds = %bb.i47  unreachable48 49bb1.i1434:                                        ; preds = %bb.i50  unreachable51 52bb1.i1523:                                        ; preds = %bb.i53  unreachable54 55bb1.i1537:                                        ; preds = %bb.i56  unreachable57 58bb.i1820:                                         ; preds = %bb1.i123759  br label %_ZNK4llvm12StringSwitchINS_9StringRefES1_E7DefaultERKS1_.exit60 61_ZNK4llvm12StringSwitchINS_9StringRefES1_E7DefaultERKS1_.exit: ; preds = %bb.i1820, %bb.i62  %PatchedName.0.0 = phi ptr [ undef, %bb.i1820 ], [ %Name.0, %bb.i ]63  br i1 undef, label %bb141, label %_ZNK4llvm9StringRef10startswithES0_.exit64 65_ZNK4llvm9StringRef10startswithES0_.exit:         ; preds = %_ZNK4llvm12StringSwitchINS_9StringRefES1_E7DefaultERKS1_.exit66  %2 = call i32 @memcmp(ptr %PatchedName.0.0, ptr @.str146, i32 3) nounwind readonly67  unreachable68 69bb141:                                            ; preds = %_ZNK4llvm12StringSwitchINS_9StringRefES1_E7DefaultERKS1_.exit70  unreachable71}72