mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[CodeGenPrepare] Pre-commit debug info test for optimizeSelectInst
This test shows that optimizeSelectInst splits a select and sinks a `fdiv` operation to one side of the diamond. However, the dbg.value for the operation isn't moved. llvm-svn: 340369
This commit is contained in:
parent
b5a8c81ac9
commit
a5b0ee143f
@ -1,5 +1,6 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt -codegenprepare -S < %s | FileCheck %s
|
||||
; RUN: opt -debugify -codegenprepare -S < %s | FileCheck %s -check-prefix=DEBUG
|
||||
|
||||
target triple = "x86_64-unknown-unknown"
|
||||
|
||||
@ -35,6 +36,20 @@ define float @fdiv_true_sink(float %a, float %b) {
|
||||
; CHECK-NEXT: [[SEL:%.*]] = phi float [ [[DIV]], [[SELECT_TRUE_SINK]] ], [ 2.000000e+00, [[ENTRY:%.*]] ]
|
||||
; CHECK-NEXT: ret float [[SEL]]
|
||||
;
|
||||
; DEBUG-LABEL: @fdiv_true_sink(
|
||||
; DEBUG-NEXT: entry:
|
||||
; DEBUG-NEXT: call void @llvm.dbg.value(metadata float [[DIV:%[^,]+]]
|
||||
; DEBUG-NEXT: [[CMP:%.*]] = fcmp ogt float [[A:%.*]], 1.000000e+00
|
||||
; DEBUG-NEXT: call void @llvm.dbg.value(metadata i1 [[CMP]]
|
||||
; DEBUG-NEXT: br i1 [[CMP]], label [[SELECT_TRUE_SINK:%.*]], label [[SELECT_END:%[^,]+]]
|
||||
; DEBUG: select.true.sink:
|
||||
; DEBUG-NEXT: [[DIV]] = fdiv float [[A]], [[B:%.*]]
|
||||
; DEBUG-NEXT: br label [[SELECT_END]]
|
||||
; DEBUG: select.end:
|
||||
; DEBUG-NEXT: [[SEL:%.*]] = phi float [ [[DIV]], [[SELECT_TRUE_SINK]] ], [ 2.000000e+00, [[ENTRY:%.*]] ]
|
||||
; DEBUG-NEXT: call void @llvm.dbg.value(metadata float [[SEL]]
|
||||
; DEBUG-NEXT: ret float [[SEL]]
|
||||
;
|
||||
entry:
|
||||
%div = fdiv float %a, %b
|
||||
%cmp = fcmp ogt float %a, 1.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user