[llvm-commits] [llvm] r153423 - in /llvm/trunk: lib/Analysis/InstructionSimplify.cpp lib/Analysis/ValueTracking.cpp test/Transforms/InstSimplify/pr12251.ll

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Mar 26 08:58:39 PDT 2012


> Why can't this just be trunc? We know that we have an i8 which contains
> either '0' or '1'... Am I missing something?

It can be a trunc. In fact that is what clang starts with when
producing the "tobool" variables. What is missing here is making
codegen use the range metadata to codegen icmp (or trunc if we make
that the canonical representation) to nothing in this case.

Another option is changing how we represent booleans. See pr12360.

Cheers,
Rafa



More information about the llvm-commits mailing list