brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 7835e9d Raw
43 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=newgvn -S | FileCheck %s3 4target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"5 6define void @patatino(ptr %blah) {7; CHECK-LABEL: @patatino(8; CHECK-NEXT:  entry:9; CHECK-NEXT:    br label [[WHILE_COND:%.*]]10; CHECK:       while.cond:11; CHECK-NEXT:    [[MEH:%.*]] = phi ptr [ [[BLAH:%.*]], [[ENTRY:%.*]] ], [ null, [[WHILE_BODY:%.*]] ]12; CHECK-NEXT:    switch i32 undef, label [[WHILE_BODY]] [13; CHECK-NEXT:      i32 666, label [[WHILE_END:%.*]]14; CHECK-NEXT:    ]15; CHECK:       while.body:16; CHECK-NEXT:    br label [[WHILE_COND]]17; CHECK:       while.end:18; CHECK-NEXT:    store i8 0, ptr [[MEH]], align 119; CHECK-NEXT:    store i8 0, ptr [[BLAH]], align 120; CHECK-NEXT:    ret void21;22entry:23  br label %while.cond24 25while.cond:26  %meh = phi ptr [ %blah, %entry ], [ null, %while.body ]27  switch i32 undef, label %while.body [28  i32 666, label %while.end29  ]30 31while.body:32  br label %while.cond33 34while.end:35;; These two stores will initially be considered equivalent, but then proven not.36;; the second store would previously end up deciding it's equivalent to a previous37;; store, but it was really just finding an optimistic version of itself38;; in the congruence class.39  store i8 0, ptr %meh, align 140  store i8 0, ptr %blah, align 141  ret void42}43