Auto merge of #26280 - Marwes:deriving_discriminant, r=pcwalton
Auto merge of #26280 - Marwes:deriving_discriminant, r=pcwalton

PR for #26128.

Improves codegen in deriving by utilizing the discriminant_value intrinsic.

I have a more detailed comment on the changes in a comment on the issue [here](https://github.com/rust-lang/rust/issues/26128#issuecomment-111509863)

### Old
```
running 7 tests
test large_c_like       ... bench:   2,694,129 ns/iter (+/- 5,170)
test large_c_like_ord   ... bench:   2,723,521 ns/iter (+/- 9,098)
test test1_partial_eq   ... bench:   2,439,317 ns/iter (+/- 2,135)
test test1_partial_ord  ... bench:   2,499,114 ns/iter (+/- 55,766)
test test2_partial_eq   ... bench:   3,562,815 ns/iter (+/- 45,590)
test test2_partial_ord  ... bench:   3,398,306 ns/iter (+/- 22,180)
test test_match_success ... bench:   1,509,267 ns/iter (+/- 1,982)
```

### New
```
running 7 tests
test large_c_like       ... bench:     286,509 ns/iter (+/- 474)
test large_c_like_ord   ... bench:     286,666 ns/iter (+/- 8,756)
test test1_partial_eq   ... bench:     286,584 ns/iter (+/- 2,789)
test test1_partial_ord  ... bench:     286,470 ns/iter (+/- 516)
test test2_partial_eq   ... bench:   2,228,997 ns/iter (+/- 34,191)
test test2_partial_ord  ... bench:   1,731,699 ns/iter (+/- 21,756)
test test_match_success ... bench:   1,509,630 ns/iter (+[- 3,765)
```

[Benchmark](https://gist.github.com/Marwes/7c0b3468d0cae972a2b4)

GBGamer/rust,pelmers/rust,vhbit/rust,reem/rust,dwillmer/rust,vhbit/rust,pshc/rust,omasanori/rust,reem/rust,l0kod/rust,dwillmer/rust,jroesch/rust,pshc/rust,jashank/rust,reem/rust,l0kod/rust,l0kod/rust,jashank/rust,nwin/rust,aidancully/rust,graydon/rust,pshc/rust,nwin/rust,zubron/rust,jroesch/rust,robertg/rust,pshc/rust,dwillmer/rust,zubron/rust,aidancully/rust,pelmers/rust,graydon/rust,vhbit/rust,zubron/rust,reem/rust,nwin/rust,l0kod/rust,dwillmer/rust,nwin/rust,pelmers/rust,zubron/rust,mvdnes/rust,nwin/rust,zubron/rust,jroesch/rust,KokaKiwi/rust,mvdnes/rust,KokaKiwi/rust,pshc/rust,graydon/rust,vhbit/rust,omasanori/rust,jashank/rust,jashank/rust,omasanori/rust,GBGamer/rust,omasanori/rust,robertg/rust,l0kod/rust,mvdnes/rust,pelmers/rust,vhbit/rust,aidancully/rust,omasanori/rust,mvdnes/rust,KokaKiwi/rust,vhbit/rust,pshc/rust,vhbit/rust,jashank/rust,graydon/rust,mvdnes/rust,vhbit/rust,KokaKiwi/rust,nwin/rust,dwillmer/rust,GBGamer/rust,jroesch/rust,graydon/rust,graydon/rust,pelmers/rust,robertg/rust,l0kod/rust,l0kod/rust,jashank/rust,dwillmer/rust,zubron/rust,dwillmer/rust,reem/rust,zubron/rust,omasanori/rust,jashank/rust,nwin/rust,robertg/rust,robertg/rust,GBGamer/rust,aidancully/rust,aidancully/rust,jashank/rust,mvdnes/rust,pshc/rust,KokaKiwi/rust,reem/rust,l0kod/rust,GBGamer/rust,dwillmer/rust,pelmers/rust,jroesch/rust,GBGamer/rust,nwin/rust,GBGamer/rust,jroesch/rust,pshc/rust,robertg/rust,zubron/rust,GBGamer/rust,jroesch/rust,KokaKiwi/rust,jroesch/rust,aidancully/rust