Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trunc(X - Y) != 0 implies X != Y #58

Open
dtcxzyw opened this issue Dec 1, 2024 · 1 comment
Open

trunc(X - Y) != 0 implies X != Y #58

dtcxzyw opened this issue Dec 1, 2024 · 1 comment

Comments

@dtcxzyw
Copy link
Owner

dtcxzyw commented Dec 1, 2024

https://alive2.llvm.org/ce/z/ZM6AGq

define i1 @src201(i64 %0, i64 %1) local_unnamed_addr #0 {
entry:
  %2 = icmp eq i64 %1, %0
  %3 = sub i64 %0, %1
  %4 = trunc i64 %3 to i32
  %5 = icmp ugt i32 %4, 2
  tail call void @llvm.assume(i1 %5)
  ret i1 %2
}

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
define noundef i1 @tgt201(i64 %0, i64 %1) local_unnamed_addr #2 {
entry:
  ret i1 false
}

tests/draco/optimized/kd_tree_attributes_encoder.cc.ll

@dtcxzyw
Copy link
Owner Author

dtcxzyw commented Dec 1, 2024

https://alive2.llvm.org/ce/z/tYgWXL


; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(inaccessiblemem: write)
define i1 @src1(i64 %0, i64 %1) local_unnamed_addr #0 {
entry:
  %2 = sub i64 %0, %1
  %3 = sdiv exact i64 %2, 12
  %4 = trunc i64 %3 to i32
  %5 = icmp ugt i32 %4, 2
  tail call void @llvm.assume(i1 %5)
  %6 = icmp eq i64 %1, %0
  ret i1 %6
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #1

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
define noundef i1 @tgt1(i64 %0, i64 %1) local_unnamed_addr #2 {
entry:
  ret i1 false
}

tests/draco/optimized/float_points_tree_encoder.cc.ll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant