This is an archive of the discontinued LLVM Phabricator instance.

[tests] precommit tests for D132658
ClosedPublic

Authored by Allen on Aug 28 2022, 8:26 PM.

Diff Detail

Event Timeline

Allen created this revision.Aug 28 2022, 8:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2022, 8:26 PM
Allen requested review of this revision.Aug 28 2022, 8:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2022, 8:26 PM

It is better to have a case test the haveNoCommonBitsSet(X, C1, DL, &AC, &I, &DT) with context or assume like:

define i32 @src(i32 %a) {
  %combits = and i32 %a , 3
  %nocombits = icmp eq i32 %combits, 0
  call void @llvm.assume(i1 %nocombits)

  %add = or i32 %a, 3
  %mul = mul i32 %add, 5
  ret i32 %mul
}

declare void @llvm.assume(i1)
Allen updated this revision to Diff 456247.Aug 28 2022, 9:55 PM

Add a new case PR57278_mul_assume

Allen added a comment.Aug 28 2022, 9:56 PM

It is better to have a case test the haveNoCommonBitsSet(X, C1, DL, &AC, &I, &DT) with context or assume like:

define i32 @src(i32 %a) {
  %combits = and i32 %a , 3
  %nocombits = icmp eq i32 %combits, 0
  call void @llvm.assume(i1 %nocombits)

  %add = or i32 %a, 3
  %mul = mul i32 %add, 5
  ret i32 %mul
}

declare void @llvm.assume(i1)

Done, thanks

This revision is now accepted and ready to land.Aug 28 2022, 10:13 PM
This revision was landed with ongoing or failed builds.Aug 28 2022, 11:20 PM
This revision was automatically updated to reflect the committed changes.