1 ; RUN: opt < %s -instcombine -S | FileCheck %s
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3 target triple = "x86_64-unknown-linux-gnu"
5 ; Function Attrs: nounwind
6 declare void @llvm.assume(i1) #1
8 ; Function Attrs: nounwind uwtable
9 define i32 @can1(i1 %a, i1 %b, i1 %c) {
12 %and = and i1 %and1, %c
13 tail call void @llvm.assume(i1 %and)
16 ; CHECK: call void @llvm.assume(i1 %a)
17 ; CHECK: call void @llvm.assume(i1 %b)
18 ; CHECK: call void @llvm.assume(i1 %c)
24 ; Function Attrs: nounwind uwtable
25 define i32 @can2(i1 %a, i1 %b, i1 %c) {
29 tail call void @llvm.assume(i1 %w)
32 ; CHECK: %[[V1:[^ ]+]] = xor i1 %a, true
33 ; CHECK: call void @llvm.assume(i1 %[[V1]])
34 ; CHECK: %[[V2:[^ ]+]] = xor i1 %b, true
35 ; CHECK: call void @llvm.assume(i1 %[[V2]])
41 attributes #0 = { nounwind uwtable }
42 attributes #1 = { nounwind }