forked from OSchip/llvm-project
[InstCombine] update RUN lines in assume test; NFC
This was in a draft of from D82703, but it got left out of the committed version, so we were not actually testing the new code.
This commit is contained in:
parent
ad2d6bbb14
commit
b7233b2c0b
|
@ -1,5 +1,6 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt < %s -instcombine -S -instcombine-infinite-loop-threshold=2 -instcombine-unsafe-select-transform=0 | FileCheck %s
|
||||
; RUN: opt < %s -instcombine -S -instcombine-infinite-loop-threshold=2 -instcombine-unsafe-select-transform=0 | FileCheck --check-prefixes=CHECK,DEFAULT %s
|
||||
; RUN: opt < %s -instcombine --enable-knowledge-retention -S -instcombine-infinite-loop-threshold=2 -instcombine-unsafe-select-transform=0 | FileCheck --check-prefixes=CHECK,BUNDLES %s
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
@ -398,14 +399,14 @@ define i32 @assumption_conflicts_with_known_bits(i32 %a, i32 %b) {
|
|||
; get in the way of the fold.
|
||||
|
||||
define void @debug_interference(i8 %x) {
|
||||
; SAME-LABEL: @debug_interference(
|
||||
; SAME-NEXT: [[CMP2:%.*]] = icmp ne i8 [[X:%.*]], 0
|
||||
; SAME-NEXT: tail call void @llvm.dbg.value(metadata i32 5, [[META7:metadata !.*]], metadata !DIExpression()), [[DBG9:!dbg !.*]]
|
||||
; SAME-NEXT: tail call void @llvm.assume(i1 false)
|
||||
; SAME-NEXT: tail call void @llvm.dbg.value(metadata i32 5, [[META7]], metadata !DIExpression()), [[DBG9]]
|
||||
; SAME-NEXT: tail call void @llvm.dbg.value(metadata i32 5, [[META7]], metadata !DIExpression()), [[DBG9]]
|
||||
; SAME-NEXT: tail call void @llvm.assume(i1 [[CMP2]])
|
||||
; SAME-NEXT: ret void
|
||||
; CHECK-LABEL: @debug_interference(
|
||||
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 [[X:%.*]], 0
|
||||
; CHECK-NEXT: tail call void @llvm.dbg.value(metadata i32 5, metadata [[META7:![0-9]+]], metadata !DIExpression()), !dbg [[DBG9:![0-9]+]]
|
||||
; CHECK-NEXT: tail call void @llvm.assume(i1 false)
|
||||
; CHECK-NEXT: tail call void @llvm.dbg.value(metadata i32 5, metadata [[META7]], metadata !DIExpression()), !dbg [[DBG9]]
|
||||
; CHECK-NEXT: tail call void @llvm.dbg.value(metadata i32 5, metadata [[META7]], metadata !DIExpression()), !dbg [[DBG9]]
|
||||
; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP2]])
|
||||
; CHECK-NEXT: ret void
|
||||
;
|
||||
%cmp1 = icmp eq i8 %x, 0
|
||||
%cmp2 = icmp ne i8 %x, 0
|
||||
|
@ -776,9 +777,15 @@ exit:
|
|||
}
|
||||
|
||||
define void @canonicalize_assume(i32* %0) {
|
||||
; SAME-LABEL: @canonicalize_assume(
|
||||
; SAME-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[TMP0:%.*]], i64 8) ]
|
||||
; SAME-NEXT: ret void
|
||||
; DEFAULT-LABEL: @canonicalize_assume(
|
||||
; DEFAULT-NEXT: [[TMP2:%.*]] = getelementptr inbounds i32, i32* [[TMP0:%.*]], i64 2
|
||||
; DEFAULT-NEXT: [[TMP3:%.*]] = bitcast i32* [[TMP2]] to i8*
|
||||
; DEFAULT-NEXT: call void @llvm.assume(i1 true) [ "align"(i8* [[TMP3]], i64 16) ]
|
||||
; DEFAULT-NEXT: ret void
|
||||
;
|
||||
; BUNDLES-LABEL: @canonicalize_assume(
|
||||
; BUNDLES-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[TMP0:%.*]], i64 8) ]
|
||||
; BUNDLES-NEXT: ret void
|
||||
;
|
||||
%2 = getelementptr inbounds i32, i32* %0, i64 2
|
||||
%3 = bitcast i32* %2 to i8*
|
||||
|
|
Loading…
Reference in New Issue